Reauth endpoint

This commit is contained in:
Kilian committed 2024-07-28 22:37:12 +02:00
1 parent 7723dd0722
commit 9828ee762a
9 files changed
+201 -26

No files matched your search

+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([