Commit bf852eda authored by Leon Tappe's avatar Leon Tappe 🔥
Browse files

fix DELETE assets/$id hopefully

parent 13001ce6
......@@ -7,7 +7,7 @@ class AssetsController extends FileController {
@override
Future<RequestOrResponse> handle(Request request) async {
// check for DELETE method and launch custom code accordingly
if (request.method == 'DELETE' && request.authorization.scopes.contains('admin')) {
if (request.method == 'DELETE' && request.authorization.isAuthorizedForScope('admin')) {
final filename = request.path.remainingPath;
final file = File('$assetsFolderPath${Platform.pathSeparator}$filename');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment