1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-09 14:46:53 +02:00

feat(rest-api): fix folders rest api next round #435

This commit is contained in:
Awilum
2020-07-31 00:00:12 +03:00
parent f2ef16e855
commit 1b876eae45

View File

@@ -170,10 +170,6 @@ $app->post('/api/folders', function (Request $request, Response $response) use (
// Set response code
$response_code = $create_folder ? 200 : 404;
// Return response
return $response
->withJson($response_data, $response_code);
// Update calls counter
Filesystem::write($folders_token_file_path, $flextype['yaml']->encode(array_replace_recursive($folders_token_file_data, ['calls' => $folders_token_file_data['calls'] + 1])));
@@ -259,10 +255,6 @@ $app->put('/api/folders/copy', function (Request $request, Response $response) u
// Set response code
$response_code = $copy_folder ? 200 : 404;
// Return response
return $response
->withJson($response_data, $response_code);
// Update calls counter
Filesystem::write($folders_token_file_path, $flextype['yaml']->encode(array_replace_recursive($folders_token_file_data, ['calls' => $folders_token_file_data['calls'] + 1])));
@@ -348,10 +340,6 @@ $app->put('/api/folders', function (Request $request, Response $response) use ($
// Set response code
$response_code = $rename_folder ? 200 : 404;
// Return response
return $response
->withJson($response_data, $response_code);
// Update calls counter
Filesystem::write($folders_token_file_path, $flextype['yaml']->encode(array_replace_recursive($folders_token_file_data, ['calls' => $folders_token_file_data['calls'] + 1])));