feat: Implement rest API endpoint to delete flow

This commit is contained in:
Faruk AYDIN
2024-09-14 11:35:17 +03:00
parent 89277e1665
commit bab25c51d9
5 changed files with 164 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
export default async (request, response) => {
const flow = await request.currentUser.authorizedFlows
.clone()
.findById(request.params.flowId)
.throwIfNotFound();
await flow.delete();
response.status(204).end();
};