mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 10:47:25 +01:00
server: Add delete methods
This commit is contained in:
parent
1d232e0903
commit
2729ed31d1
5 changed files with 30 additions and 0 deletions
|
|
@ -33,4 +33,10 @@ class EnsemblesController extends ResourceController {
|
||||||
|
|
||||||
return Response.ok(null);
|
return Response.ok(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation.delete('id')
|
||||||
|
Future<Response> deleteEnsemble(@Bind.path('id') int id) async {
|
||||||
|
await db.deleteEnsemble(id);
|
||||||
|
return Response.ok(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,4 +33,10 @@ class InstrumentsController extends ResourceController {
|
||||||
|
|
||||||
return Response.ok(null);
|
return Response.ok(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation.delete('id')
|
||||||
|
Future<Response> deleteInstrument(@Bind.path('id') int id) async {
|
||||||
|
await db.deleteInstrument(id);
|
||||||
|
return Response.ok(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,4 +33,10 @@ class PersonsController extends ResourceController {
|
||||||
|
|
||||||
return Response.ok(null);
|
return Response.ok(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation.delete('id')
|
||||||
|
Future<Response> deletePerson(@Bind.path('id') int id) async {
|
||||||
|
await db.deletePerson(id);
|
||||||
|
return Response.ok(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,10 @@ class RecordingsController extends ResourceController {
|
||||||
|
|
||||||
return Response.ok(null);
|
return Response.ok(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation.delete('id')
|
||||||
|
Future<Response> deleteRecording(@Bind.path('id') int id) async {
|
||||||
|
await db.deleteRecording(id);
|
||||||
|
return Response.ok(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,10 @@ class WorksController extends ResourceController {
|
||||||
|
|
||||||
return Response.ok(null);
|
return Response.ok(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Operation.delete('id')
|
||||||
|
Future<Response> deleteWork(@Bind.path('id') int id) async {
|
||||||
|
await db.deleteWork(id);
|
||||||
|
return Response.ok(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue