fix: correct internship retrieval method in get function of InternshipStatusController

This commit is contained in:
2025-11-03 19:54:22 +01:00
parent 25c51af66e
commit 28a79cf7c6

View File

@@ -19,7 +19,7 @@ class InternshipStatusController extends Controller
], 400); ], 400);
} }
$internship = Internship::where($id); $internship = Internship::find($id);
if ($user->role !== 'ADMIN' && $internship->user_id !== $user->id) { if ($user->role !== 'ADMIN' && $internship->user_id !== $user->id) {
abort(403, 'Unauthorized'); abort(403, 'Unauthorized');
} }