update controllers logic

This commit is contained in:
root
2026-04-23 00:04:35 -04:00
parent 1977a513df
commit ca4ba272fc
353 changed files with 13402 additions and 1301 deletions
@@ -46,9 +46,14 @@ class AssignmentApiController extends Controller
], 422);
}
$userId = (int) ($request->user()?->id ?? 0);
if ($userId <= 0) {
return response()->json(['message' => 'Unauthorized.'], 401);
}
$assignment = $this->assignmentService->storeAssignment(
data: $validator->validated(),
updatedBy: $request->user()?->id
updatedBy: $userId
);
return response()->json([