From b4eae5b0b39934e558dac957da7feaa5e21d183c Mon Sep 17 00:00:00 2001 From: Toast Date: Thu, 30 Jan 2025 12:08:02 +0100 Subject: [PATCH] Shows/controller: return show ID on creation --- src/shows/shows.controller.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shows/shows.controller.ts b/src/shows/shows.controller.ts index 592d0b0..b9b8083 100644 --- a/src/shows/shows.controller.ts +++ b/src/shows/shows.controller.ts @@ -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({