feat: use arrow functions on authorization skip method

This commit is contained in:
Torsten Dittmann
2021-12-16 12:30:43 +01:00
parent 30ed41c21d
commit d1f901e7a8
5 changed files with 30 additions and 52 deletions
+1 -3
View File
@@ -807,9 +807,7 @@ App::get('/v1/functions/:functionId/executions')
/** @var Appwrite\Utopia\Response $response */
/** @var Utopia\Database\Database $dbForInternal */
$function = Authorization::skip(function() use ($dbForInternal, $functionId) {
return $dbForInternal->getDocument('functions', $functionId);
});
$function = Authorization::skip(fn() => $dbForInternal->getDocument('functions', $functionId));
if ($function->isEmpty()) {
throw new Exception('Function not found', 404);