Add POST API for albums.

pull/7/head
Sander Vocke 5 years ago
parent 3e82549307
commit ff42bda8d2
  1. 16
      client/src/api.ts

@ -187,6 +187,22 @@ export function checkModifySongRequest(req: any): boolean {
return true; return true;
} }
// Create a new album (POST).
export const CreateAlbumEndpoint = '/album';
export interface CreateAlbumRequest {
name: String;
tagIds?: Number[];
artistIds?: Number[];
storeLinks?: String[];
}
export interface CreateAlbumResponse {
id: Number;
}
export function checkCreateAlbumRequest(req: any): boolean {
return "body" in req &&
"name" in req.body;
}
// Create a new artist (POST). // Create a new artist (POST).
export const CreateArtistEndpoint = '/artist'; export const CreateArtistEndpoint = '/artist';
export interface CreateArtistRequest { export interface CreateArtistRequest {

Loading…
Cancel
Save