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')
async remove(@Param('id') id: string) {
try {
const deletedMovie = await this.genresService.remove(id);
if (!deletedMovie) {
const deletedGenre = await this.genresService.remove(id);
if (!deletedGenre) {
throw new NotFoundException({
status: 'Error',
message: `Can't find genre with id ${id}`,

View file

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