Reauth endpoint

This commit is contained in:
2024-07-28 22:37:12 +02:00
parent 7723dd0722
commit 9828ee762a
9 changed files with 201 additions and 26 deletions
+9 -1
View File
@@ -27,7 +27,7 @@ class ApiError extends Exception
]), 400);
}
public static function unauthorized(string $message)
public static function notAllowed(string $message)
{
return new ApiError(json_encode([
"code" => "NotAllowed",
@@ -35,6 +35,14 @@ class ApiError extends Exception
]), 401);
}
public static function unauthorized(string $message)
{
return new ApiError(json_encode([
"code" => "Unauthorized",
"message" => $message,
]), 401);
}
public static function notFound(string $entity)
{
return new ApiError(json_encode([