server: Add delete methods

This commit is contained in:
Elias Projahn 2020-05-01 14:46:36 +02:00
parent 1d232e0903
commit 2729ed31d1
5 changed files with 30 additions and 0 deletions

View file

@ -33,4 +33,10 @@ class EnsemblesController extends ResourceController {
return Response.ok(null);
}
@Operation.delete('id')
Future<Response> deleteEnsemble(@Bind.path('id') int id) async {
await db.deleteEnsemble(id);
return Response.ok(null);
}
}

View file

@ -33,4 +33,10 @@ class InstrumentsController extends ResourceController {
return Response.ok(null);
}
@Operation.delete('id')
Future<Response> deleteInstrument(@Bind.path('id') int id) async {
await db.deleteInstrument(id);
return Response.ok(null);
}
}

View file

@ -33,4 +33,10 @@ class PersonsController extends ResourceController {
return Response.ok(null);
}
@Operation.delete('id')
Future<Response> deletePerson(@Bind.path('id') int id) async {
await db.deletePerson(id);
return Response.ok(null);
}
}

View file

@ -24,4 +24,10 @@ class RecordingsController extends ResourceController {
return Response.ok(null);
}
@Operation.delete('id')
Future<Response> deleteRecording(@Bind.path('id') int id) async {
await db.deleteRecording(id);
return Response.ok(null);
}
}

View file

@ -24,4 +24,10 @@ class WorksController extends ResourceController {
return Response.ok(null);
}
@Operation.delete('id')
Future<Response> deleteWork(@Bind.path('id') int id) async {
await db.deleteWork(id);
return Response.ok(null);
}
}