1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-10 07:06:45 +02:00

refactor(rest-api): fix unreachable return for Files API copy method

This commit is contained in:
Awilum
2020-08-03 08:40:44 +03:00
parent 4697338cb9
commit 7dc964aa43

View File

@@ -395,12 +395,6 @@ $app->put('/api/files/copy', function (Request $request, Response $response) use
// Update calls counter
Filesystem::write($files_token_file_path, $flextype['yaml']->encode(array_replace_recursive($files_token_file_data, ['calls' => $files_token_file_data['calls'] + 1])));
// Return response
return $response
->withStatus($response_code)
->withHeader('Content-Type', 'application/json;charset=' . $flextype->registry->get('flextype.settings.charset'))
->write($flextype->json->encode($response_data));
if ($response_code === 404) {
// Return response
return $response