Remove all references to movies

This commit is contained in:
Toast 2025-02-20 18:58:38 +01:00
parent 72e0b07f71
commit fd4431c09c
2 changed files with 6 additions and 6 deletions

View file

@ -79,8 +79,8 @@ export class GenresController {
@Delete('/id/:id') @Delete('/id/:id')
async remove(@Param('id') id: string) { async remove(@Param('id') id: string) {
try { try {
const deletedMovie = await this.genresService.remove(id); const deletedGenre = await this.genresService.remove(id);
if (!deletedMovie) { if (!deletedGenre) {
throw new NotFoundException({ throw new NotFoundException({
status: 'Error', status: 'Error',
message: `Can't find genre with id ${id}`, message: `Can't find genre with id ${id}`,

View file

@ -130,7 +130,7 @@ export class ShowsController {
} else { } else {
return { return {
status: 'Ok', status: 'Ok',
message: 'Movie was updated successfully', message: 'Show was updated successfully',
}; };
} }
} catch (error) { } catch (error) {
@ -148,8 +148,8 @@ export class ShowsController {
@Delete('id/:id') @Delete('id/:id')
async remove(@Param('id') id: string) { async remove(@Param('id') id: string) {
try { try {
const deletedMovie = await this.showsService.remove(id); const deletedShow = await this.showsService.remove(id);
if (!deletedMovie) { if (!deletedShow) {
throw new NotFoundException({ throw new NotFoundException({
status: 'Error', status: 'Error',
message: `Can't find show with id ${id}`, message: `Can't find show with id ${id}`,
@ -157,7 +157,7 @@ export class ShowsController {
} else { } else {
return { return {
status: 'Ok', status: 'Ok',
message: 'Movie removed successfully', message: 'Show removed successfully',
}; };
} }
} catch (error) { } catch (error) {