Skip to content

Commit

Permalink
[Api] Return 404 for Students and AttendanceEvents
Browse files Browse the repository at this point in the history
  • Loading branch information
lost1227 committed Oct 16, 2023
1 parent 53b3814 commit cb46211
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -97,7 +97,7 @@ public function store(Request $request)

public function show(String $id)
{
return AttendanceEvent::withTrashed()->find($id);
return AttendanceEvent::withTrashed()->findOrFail($id);
}

public function destroy(AttendanceEvent $event) {
Expand Down
2 changes: 1 addition & 1 deletion attendance-api/app/Http/Controllers/StudentController.php
Expand Up @@ -86,7 +86,7 @@ public function store(Request $request)
*/
public function show(String $id)
{
return Student::withTrashed()->find($id);
return Student::withTrashed()->findOrFail($id);
}

/**
Expand Down

0 comments on commit cb46211

Please sign in to comment.