Checking API calls

This commit is contained in:
Phill Pover 2025-04-07 13:18:04 +01:00
parent 54d4fa50f3
commit a8f7631ff1
2 changed files with 3 additions and 1 deletions

View File

@ -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()

View File

@ -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" },