mirror of
https://github.com/flextype/flextype.git
synced 2025-08-18 10:51:21 +02:00
refactor(core): fix code standard for Delivery API's #347
This commit is contained in:
@@ -39,7 +39,6 @@ $app->get('/api/delivery/entries', function (Request $request, Response $respons
|
||||
|
||||
// Validate delivery token
|
||||
if (validate_delivery_entries_token($request, $flextype)) {
|
||||
|
||||
$delivery_entries_token_file_path = PATH['tokens'] . '/delivery/entries/' . $request->getQueryParams()['token'] . '/token.yaml';
|
||||
|
||||
// Set delivery token file
|
||||
@@ -66,7 +65,6 @@ $app->get('/api/delivery/entries', function (Request $request, Response $respons
|
||||
} else {
|
||||
return $response->withJson(["detail" => "Incorrect authentication credentials."], 401);
|
||||
}
|
||||
|
||||
} else {
|
||||
return $response->withJson(["detail" => "Incorrect authentication credentials."], 401);
|
||||
}
|
||||
|
@@ -35,7 +35,6 @@ $app->get('/api/delivery/images/{path:.+}', function (Request $request, Response
|
||||
|
||||
// Validate delivery image token
|
||||
if (validate_delivery_images_token($request, $flextype)) {
|
||||
|
||||
$delivery_images_token_file_path = PATH['tokens'] . '/delivery/images/' . $request->getQueryParams()['token'] . '/token.yaml';
|
||||
|
||||
// Set delivery token file
|
||||
@@ -53,7 +52,6 @@ $app->get('/api/delivery/images/{path:.+}', function (Request $request, Response
|
||||
} else {
|
||||
return $response->withJson([], 404);
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
return $response->withJson(["detail" => "Incorrect authentication credentials."], 401);
|
||||
@@ -63,7 +61,6 @@ $app->get('/api/delivery/images/{path:.+}', function (Request $request, Response
|
||||
}
|
||||
|
||||
return $response->withStatus(404);
|
||||
|
||||
} else {
|
||||
return $response->withJson(["detail" => "Incorrect authentication credentials."], 401);
|
||||
}
|
||||
|
Reference in New Issue
Block a user