feat: Implement comprehensive product management, including categories, pricing, and integration into the order system.
This commit is contained in:
@@ -22,12 +22,16 @@ class ApiAuthCheck
|
||||
if (!Auth::guard($checkGuard)->check()) {
|
||||
return response()->json([
|
||||
'error' => true,
|
||||
'message' => 'Unauthorized. Access Denied.',
|
||||
'data' => [],
|
||||
'message' => 'Vui lòng đăng nhập để thực hiện!',
|
||||
'code' => 401
|
||||
], 401);
|
||||
}
|
||||
|
||||
// Ensure request user is set for the controller
|
||||
$request->setUserResolver(function () use ($checkGuard) {
|
||||
return Auth::guard($checkGuard)->user();
|
||||
});
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user