|
|
|
@ -157,10 +157,6 @@ function submitListen(id: string, ts: Date): Promise<Response> {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function getCfg(): Promise<Config> {
|
|
|
|
|
|
|
|
return fetch(`/apis/web/v1/config`).then(r => r.json() as Promise<Config>)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getApiKeys(): Promise<ApiKey[]> {
|
|
|
|
function getApiKeys(): Promise<ApiKey[]> {
|
|
|
|
return fetch(`/apis/web/v1/user/apikeys`).then(
|
|
|
|
return fetch(`/apis/web/v1/user/apikeys`).then(
|
|
|
|
(r) => r.json() as Promise<ApiKey[]>
|
|
|
|
(r) => r.json() as Promise<ApiKey[]>
|
|
|
|
@ -281,7 +277,6 @@ function getNowPlaying(): Promise<NowPlaying> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export {
|
|
|
|
export {
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
|
|
|
getLastListens,
|
|
|
|
getLastListens,
|
|
|
|
getTopTracks,
|
|
|
|
getTopTracks,
|
|
|
|
getTopAlbums,
|
|
|
|
getTopAlbums,
|
|
|
|
@ -313,37 +308,6 @@ export {
|
|
|
|
submitListen,
|
|
|
|
submitListen,
|
|
|
|
getNowPlaying,
|
|
|
|
getNowPlaying,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
=======
|
|
|
|
|
|
|
|
getLastListens,
|
|
|
|
|
|
|
|
getTopTracks,
|
|
|
|
|
|
|
|
getTopAlbums,
|
|
|
|
|
|
|
|
getTopArtists,
|
|
|
|
|
|
|
|
getActivity,
|
|
|
|
|
|
|
|
getStats,
|
|
|
|
|
|
|
|
search,
|
|
|
|
|
|
|
|
replaceImage,
|
|
|
|
|
|
|
|
mergeTracks,
|
|
|
|
|
|
|
|
mergeAlbums,
|
|
|
|
|
|
|
|
mergeArtists,
|
|
|
|
|
|
|
|
imageUrl,
|
|
|
|
|
|
|
|
login,
|
|
|
|
|
|
|
|
logout,
|
|
|
|
|
|
|
|
getCfg,
|
|
|
|
|
|
|
|
deleteItem,
|
|
|
|
|
|
|
|
updateUser,
|
|
|
|
|
|
|
|
getAliases,
|
|
|
|
|
|
|
|
createAlias,
|
|
|
|
|
|
|
|
deleteAlias,
|
|
|
|
|
|
|
|
setPrimaryAlias,
|
|
|
|
|
|
|
|
getApiKeys,
|
|
|
|
|
|
|
|
createApiKey,
|
|
|
|
|
|
|
|
deleteApiKey,
|
|
|
|
|
|
|
|
updateApiKeyLabel,
|
|
|
|
|
|
|
|
deleteListen,
|
|
|
|
|
|
|
|
getAlbum,
|
|
|
|
|
|
|
|
getExport,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
>>>>>>> 5d0491a (feat: add server-side configuration with default theme (#90))
|
|
|
|
|
|
|
|
type Track = {
|
|
|
|
type Track = {
|
|
|
|
id: number;
|
|
|
|
id: number;
|
|
|
|
title: string;
|
|
|
|
title: string;
|
|
|
|
@ -426,7 +390,6 @@ type ApiKey = {
|
|
|
|
created_at: Date;
|
|
|
|
created_at: Date;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
type ApiError = {
|
|
|
|
type ApiError = {
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
|
|
|
error: string;
|
|
|
|
error: string;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
type Config = {
|
|
|
|
type Config = {
|
|
|
|
@ -454,27 +417,3 @@ export type {
|
|
|
|
Config,
|
|
|
|
Config,
|
|
|
|
NowPlaying,
|
|
|
|
NowPlaying,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
=======
|
|
|
|
|
|
|
|
error: string
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
type Config = {
|
|
|
|
|
|
|
|
default_theme: string
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type {
|
|
|
|
|
|
|
|
getItemsArgs,
|
|
|
|
|
|
|
|
getActivityArgs,
|
|
|
|
|
|
|
|
Track,
|
|
|
|
|
|
|
|
Artist,
|
|
|
|
|
|
|
|
Album,
|
|
|
|
|
|
|
|
Listen,
|
|
|
|
|
|
|
|
SearchResponse,
|
|
|
|
|
|
|
|
PaginatedResponse,
|
|
|
|
|
|
|
|
ListenActivityItem,
|
|
|
|
|
|
|
|
User,
|
|
|
|
|
|
|
|
Alias,
|
|
|
|
|
|
|
|
ApiKey,
|
|
|
|
|
|
|
|
ApiError,
|
|
|
|
|
|
|
|
Config
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
>>>>>>> 5d0491a (feat: add server-side configuration with default theme (#90))
|
|
|
|
|
|
|
|
|