diff --git a/app/Http/Controllers/QuestApiController.php b/app/Http/Controllers/QuestApiController.php index ee45fb7..f0b71f3 100644 --- a/app/Http/Controllers/QuestApiController.php +++ b/app/Http/Controllers/QuestApiController.php @@ -50,7 +50,7 @@ public function give(Request $request, Quest $quest): JsonResponse return response()->json([ 'status' => 'error', 'message' => 'Participant not enrolled in this edition!', - ], 400); + ], 412); } try { diff --git a/app/Http/Controllers/QuestController.php b/app/Http/Controllers/QuestController.php index 2d299cf..cce8f39 100644 --- a/app/Http/Controllers/QuestController.php +++ b/app/Http/Controllers/QuestController.php @@ -15,7 +15,6 @@ public function give(Request $request, Quest $quest) $request->validate([ 'quest_code' => 'required|exists:participants,quest_code', ]); - $edition = $request->input('edition'); $participant = Participant::firstWhere('quest_code', $request->get('quest_code')); $enrollment = $participant->enrollments()->where('edition_id', $edition?->id)->first();