Shows/controller: return show ID on creation

This commit is contained in:
Toast 2025-01-30 12:08:02 +01:00
parent adf315a187
commit b4eae5b0b3

View file

@ -21,10 +21,11 @@ export class ShowsController {
@Post()
async create(@Body() dto: ShowDto) {
try {
await this.showsService.create(dto);
const newShow = await this.showsService.create(dto);
return {
status: 'Ok',
message: 'Show was created successfully',
newId: newShow._id
};
} catch (error) {
throw new BadRequestException({