Remove all references to movies
This commit is contained in:
parent
72e0b07f71
commit
fd4431c09c
2 changed files with 6 additions and 6 deletions
|
|
@ -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}`,
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue