allow importing of libraries via URL, update db schema

This commit is contained in:
Zimeng Xiong
2025-11-24 14:32:37 -08:00
parent ee8204532d
commit fa73708d97
14 changed files with 1301 additions and 16 deletions
+12
View File
@@ -84,3 +84,15 @@ export const deleteCollection = async (id: string) => {
const response = await api.delete<{ success: true }>(`/collections/${id}`);
return response.data;
};
// --- Library ---
export const getLibrary = async () => {
const response = await api.get<{ items: any[] }>("/library");
return response.data.items;
};
export const updateLibrary = async (items: any[]) => {
const response = await api.put<{ items: any[] }>("/library", { items });
return response.data.items;
};