Returning DeleteResult on deletion
All checks were successful
Music Collection CI Workflow / test (./backend) (push) Successful in 28s
Music Collection CI Workflow / test (./frontend) (push) Successful in 34s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 51s
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Successful in 1m50s
Music Collection CI Workflow / deploy (push) Successful in 23s
All checks were successful
Music Collection CI Workflow / test (./backend) (push) Successful in 28s
Music Collection CI Workflow / test (./frontend) (push) Successful in 34s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 51s
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Successful in 1m50s
Music Collection CI Workflow / deploy (push) Successful in 23s
This commit is contained in:
parent
73a39a064f
commit
57c5ada280
@ -1,4 +1,5 @@
|
|||||||
import { Body, Controller, Delete, Get, Param, Post, Put, UsePipes, ValidationPipe } from '@nestjs/common';
|
import { Body, Controller, Delete, Get, Param, Post, Put, UsePipes, ValidationPipe } from '@nestjs/common';
|
||||||
|
import { DeleteResult } from 'typeorm';
|
||||||
import { AlbumService } from './album.service';
|
import { AlbumService } from './album.service';
|
||||||
import { Album } from './album.entity';
|
import { Album } from './album.entity';
|
||||||
import { CreateAlbumDto } from './dto/create-album.dto';
|
import { CreateAlbumDto } from './dto/create-album.dto';
|
||||||
@ -32,7 +33,7 @@ export class AlbumController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Delete(':id')
|
@Delete(':id')
|
||||||
async remove(@Param('id') id: number): Promise<void> {
|
async remove(@Param('id') id: number): Promise<DeleteResult> {
|
||||||
return this.albumService.remove(id);
|
return this.albumService.remove(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { InjectRepository } from '@nestjs/typeorm';
|
import { InjectRepository } from '@nestjs/typeorm';
|
||||||
import { Repository } from 'typeorm';
|
import { DeleteResult, Repository } from 'typeorm';
|
||||||
import { Album } from './album.entity';
|
import { Album } from './album.entity';
|
||||||
import { CreateAlbumDto } from './dto/create-album.dto';
|
import { CreateAlbumDto } from './dto/create-album.dto';
|
||||||
import { UpdateAlbumDto } from './dto/update-album.dto';
|
import { UpdateAlbumDto } from './dto/update-album.dto';
|
||||||
@ -59,7 +59,7 @@ export class AlbumService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove(id: number): Promise<void> {
|
async remove(id: number): Promise<DeleteResult> {
|
||||||
await this.albumRepository.delete(id);
|
return await this.albumRepository.delete(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { Body, Controller, Delete, Get, Param, Post, Put, UsePipes, ValidationPipe } from '@nestjs/common';
|
import { Body, Controller, Delete, Get, Param, Post, Put, UsePipes, ValidationPipe } from '@nestjs/common';
|
||||||
|
import { DeleteResult } from 'typeorm';
|
||||||
import { SongService } from './song.service';
|
import { SongService } from './song.service';
|
||||||
import { Song } from './song.entity';
|
import { Song } from './song.entity';
|
||||||
import { CreateSongDto } from './dto/create-song.dto';
|
import { CreateSongDto } from './dto/create-song.dto';
|
||||||
@ -32,7 +33,7 @@ export class SongController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Delete(':id')
|
@Delete(':id')
|
||||||
async remove(@Param('id') id: number): Promise<void> {
|
async remove(@Param('id') id: number): Promise<DeleteResult> {
|
||||||
return this.songService.remove(id);
|
return this.songService.remove(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { InjectRepository } from '@nestjs/typeorm';
|
import { InjectRepository } from '@nestjs/typeorm';
|
||||||
import { Repository } from 'typeorm';
|
import { DeleteResult, Repository } from 'typeorm';
|
||||||
import { Album } from '../album/album.entity';
|
import { Album } from '../album/album.entity';
|
||||||
import { Song } from './song.entity';
|
import { Song } from './song.entity';
|
||||||
import { CreateSongDto } from './dto/create-song.dto';
|
import { CreateSongDto } from './dto/create-song.dto';
|
||||||
@ -61,8 +61,8 @@ export class SongService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove(id: number): Promise<void> {
|
async remove(id: number): Promise<DeleteResult> {
|
||||||
await this.songRepository.delete(id);
|
return await this.songRepository.delete(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user