feat: suppression des commandes PENDING depuis /commands
Build & Deploy / build (push) Successful in 40s
Build & Deploy / docker (push) Successful in 1m4s
Build & Deploy / deploy (push) Successful in 26s

- Ajout de destroy() dans CommandsController (DELETE /commands/:id)
- Routes DELETE /commands/:id dans les groupes /api/v1 et /internal
- Bouton supprimer dans Commands.vue visible uniquement sur les commandes PENDING
- Utilise fetchWithCsrf pour la protection CSRF
This commit is contained in:
kevin.lhereec committed 2026-07-17 10:31:56 +02:00
1 parent b22d3e9b56
commit b00c0c94a8
3 files changed
+51 -1

No files matched your search

+8
View File
@@ -28,4 +28,12 @@ export default class CommandsController {
return response.status(201).json(command)
}
async destroy({ params, response }: HttpContext) {
const deleted = await this.commandService.deleteCommand(params.id)
if (!deleted) {
return response.status(404).json({ error: 'Command not found' })
}
return response.status(204).send('')
}
}