feat: Implement delete step rest API endpoint

This commit is contained in:
Faruk AYDIN
2024-08-23 16:53:14 +03:00
parent 5af1d94fc0
commit 0cf9bc1a32
6 changed files with 178 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
export default async (request, response) => {
const step = await request.currentUser.authorizedSteps
.findById(request.params.stepId)
.throwIfNotFound();
await step.delete();
response.status(204).end();
};