Skip to content

Commit

Permalink
Merge pull request #120 from EscolaLMS/bugfix/multiple-users
Browse files Browse the repository at this point in the history
Removed required author_id
  • Loading branch information
daVitekPL authored Nov 20, 2024
2 parents 0544ad9 + d655c51 commit 61ad41c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Http/Requests/StoreConsultationRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function rules(): array
'description' => ['required', 'string', 'min:3'],
'duration' => ['nullable', 'string', 'max:80'],
'image' => ['nullable', 'file', 'image'],
'author_id' => ['required', 'integer', 'exists:users,id'],
'author_id' => ['integer', 'exists:users,id'],
'active_from' => ['date'],
'active_to' => ['date', 'after_or_equal:active_from'],
'proposed_dates' => ['array'],
Expand Down
2 changes: 1 addition & 1 deletion tests/APIs/ConsultationStoreApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,6 @@ public function testConsultationStoreWithModelFields(): void
public function testConsultationStoreRequiredValidation(): void
{
$response = $this->actingAs($this->user, 'api')->json('POST', $this->apiUrl);
$response->assertJsonValidationErrors(['name', 'status', 'description', 'author_id']);
$response->assertJsonValidationErrors(['name', 'status', 'description']);
}
}

0 comments on commit 61ad41c

Please sign in to comment.