Checking API calls
This commit is contained in:
parent
54d4fa50f3
commit
a8f7631ff1
@ -1,6 +1,7 @@
|
|||||||
import { IsNotEmpty, IsString } from 'class-validator';
|
import { IsNotEmpty, IsNumber, IsString } from 'class-validator';
|
||||||
|
|
||||||
export class UpdateAlbumDto {
|
export class UpdateAlbumDto {
|
||||||
|
@IsNumber()
|
||||||
id: number;
|
id: number;
|
||||||
|
|
||||||
@IsString()
|
@IsString()
|
||||||
|
@ -58,6 +58,7 @@ export async function createAlbum(formData: FormData) {
|
|||||||
const title = formData.get('title');
|
const title = formData.get('title');
|
||||||
const artist = formData.get('artist');
|
const artist = formData.get('artist');
|
||||||
const genre = formData.get('genre');
|
const genre = formData.get('genre');
|
||||||
|
console.log(title, artist, genre);
|
||||||
return fetch("https://api.anatid.net/album/", {
|
return fetch("https://api.anatid.net/album/", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user