Better Errors
This commit is contained in:
@@ -23,7 +23,7 @@ class OptAuth implements IMiddleware
|
||||
User::getByToken($token);
|
||||
} catch (Exception $err) {
|
||||
// No user with this token exists
|
||||
Response::response()->httpCode(401)->json(["message" => "Not Authorized"]);
|
||||
Response::response()->httpCode(401)->json(["code" => "Unauthorized", "message" => "Not Authorized"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user