Adding Whitelist to posts and puts
All checks were successful
Music Collection CI Workflow / test (./backend) (push) Successful in 35s
Music Collection CI Workflow / test (./frontend) (push) Successful in 38s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 54s
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Successful in 1m52s
Music Collection CI Workflow / deploy (push) Successful in 24s
All checks were successful
Music Collection CI Workflow / test (./backend) (push) Successful in 35s
Music Collection CI Workflow / test (./frontend) (push) Successful in 38s
Music Collection CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/music-collection-backend, ./backend) (push) Successful in 54s
Music Collection CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/music-collection-frontend, ./frontend) (push) Successful in 1m52s
Music Collection CI Workflow / deploy (push) Successful in 24s
This commit is contained in:
parent
b426187753
commit
6222d2f8e2
@ -30,15 +30,13 @@ export class AlbumController {
|
||||
}
|
||||
|
||||
@Post()
|
||||
@UsePipes(new ValidationPipe({ transform: true }))
|
||||
async create(
|
||||
@Body() createAlbumDto: CreateAlbumDto,
|
||||
): Promise<Album | string | null> {
|
||||
@UsePipes(new ValidationPipe({ transform: true, whitelist: true }))
|
||||
async create(@Body() createAlbumDto: CreateAlbumDto): Promise<Album | string | null> {
|
||||
return this.albumService.create(createAlbumDto);
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
@UsePipes(new ValidationPipe({ transform: true }))
|
||||
@UsePipes(new ValidationPipe({ transform: true, whitelist: true }))
|
||||
async update(
|
||||
@Param('id') id: number,
|
||||
@Body() updateAlbumDto: UpdateAlbumDto,
|
||||
|
@ -30,15 +30,13 @@ export class SongController {
|
||||
}
|
||||
|
||||
@Post()
|
||||
@UsePipes(new ValidationPipe({ transform: true }))
|
||||
async create(
|
||||
@Body() createSongDto: CreateSongDto,
|
||||
): Promise<Song | string | null> {
|
||||
@UsePipes(new ValidationPipe({ transform: true, whitelist: true }))
|
||||
async create(@Body() createSongDto: CreateSongDto): Promise<Song | string | null> {
|
||||
return this.songService.create(createSongDto);
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
@UsePipes(new ValidationPipe({ transform: true }))
|
||||
@UsePipes(new ValidationPipe({ transform: true, whitelist: true }))
|
||||
async update(
|
||||
@Param('id') id: number,
|
||||
@Body() updateSongDto: UpdateSongDto,
|
||||
|
@ -58,7 +58,6 @@ export async function createAlbum(formData: FormData) {
|
||||
const title = formData.get('title');
|
||||
const artist = formData.get('artist');
|
||||
const genre = formData.get('genre');
|
||||
console.log(title, artist, genre);
|
||||
return fetch("https://api.anatid.net/album/", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
|
Loading…
x
Reference in New Issue
Block a user