fix(backend): DELETE /webhooks/:id returns 204 No Content
Matches REST convention and the frontend api-client's existing 204 fast-path, avoiding a JSON-parse crash on an empty response body.
This commit is contained in:
1 parent
59fdc816a0
commit
2458927d38
2 files changed
+11
-2
No files matched your search
@@ -1,4 +1,12 @@
|
||||
import { Body, Controller, Delete, Get, Param, Post } from '@nestjs/common';
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Delete,
|
||||
Get,
|
||||
HttpCode,
|
||||
Param,
|
||||
Post,
|
||||
} from '@nestjs/common';
|
||||
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
|
||||
import { Role } from '../../generated/prisma';
|
||||
import { Roles } from '../auth/decorators/roles.decorator';
|
||||
@@ -28,6 +36,7 @@ export class WebhooksController {
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
@HttpCode(204)
|
||||
delete(@Param('id') id: string, @CurrentUser() actor: AuthenticatedUser) {
|
||||
return this.webhooksService.delete(id, actor.id);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user