mirror of
https://github.com/Kovah/LinkAce.git
synced 2025-01-18 05:38:40 +01:00
Fix editing of notes, remove required link_id field (#243)
This commit is contained in:
parent
7cc119adb0
commit
30d4a587c3
@ -31,7 +31,6 @@ class NoteUpdateRequest extends FormRequest
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'link_id' => 'required',
|
||||
'note' => 'required',
|
||||
'is_private' => 'sometimes|boolean',
|
||||
];
|
||||
|
@ -12,8 +12,6 @@
|
||||
@method('PATCH')
|
||||
@csrf
|
||||
|
||||
<input type="hidden" name="note_id" value="{{ $note->id }}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="label" for="note">@lang('note.note_content')</label>
|
||||
<textarea name="note" id="note"
|
||||
|
@ -71,7 +71,6 @@ class NoteApiTest extends ApiTestCase
|
||||
]);
|
||||
|
||||
$response = $this->patchJsonAuthorized('api/v1/notes/1', [
|
||||
'link_id' => $link->id,
|
||||
'note' => 'Gallia est omnis divisa in partes tres, quarum.',
|
||||
'is_private' => false,
|
||||
]);
|
||||
@ -95,7 +94,6 @@ class NoteApiTest extends ApiTestCase
|
||||
]);
|
||||
|
||||
$response->assertJsonValidationErrors([
|
||||
'link_id' => 'The link id field is required.',
|
||||
'note' => 'The note field is required.',
|
||||
]);
|
||||
}
|
||||
@ -103,7 +101,6 @@ class NoteApiTest extends ApiTestCase
|
||||
public function testUpdateRequestNotFound(): void
|
||||
{
|
||||
$response = $this->patchJsonAuthorized('api/v1/notes/1', [
|
||||
'link_id' => 1,
|
||||
'note' => 'Sed haec quis possit intrepidus aestimare tellus.',
|
||||
'is_private' => false,
|
||||
]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user