This commit is contained in:
Gabe Farrell 2026-01-11 01:40:11 -05:00
parent 4919e83366
commit 9bc3ef0c93
3 changed files with 70 additions and 1 deletions

View file

@ -270,6 +270,19 @@ function setPrimaryAlias(
body: form,
});
}
function updateMbzId(
type: string,
id: number,
mbzid: string
): Promise<Response> {
const form = new URLSearchParams();
form.append(`${type}_id`, String(id));
form.append("mbz_id", mbzid);
return fetch(`/apis/web/v1/mbzid`, {
method: "PATCH",
body: form,
});
}
function getAlbum(id: number): Promise<Album> {
return fetch(`/apis/web/v1/album?id=${id}`).then(
(r) => r.json() as Promise<Album>
@ -318,6 +331,7 @@ export {
createAlias,
deleteAlias,
setPrimaryAlias,
updateMbzId,
getApiKeys,
createApiKey,
deleteApiKey,