1
0
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:
Kovah 2021-03-06 19:12:07 +01:00
parent 7cc119adb0
commit 30d4a587c3
No known key found for this signature in database
GPG Key ID: AAAA031BA9830D7B
3 changed files with 0 additions and 6 deletions

View File

@ -31,7 +31,6 @@ class NoteUpdateRequest extends FormRequest
public function rules()
{
return [
'link_id' => 'required',
'note' => 'required',
'is_private' => 'sometimes|boolean',
];

View File

@ -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"

View File

@ -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,
]);