feat(libs): create library by name only; root_path derived server-side as BOOKS_DIR/SafeName(name), validated at creation; drop root_path input from admin UI; align changelogs to bilingual template; trim AGENTS.md to rules not derivable from repo layout
This commit is contained in:
@@ -124,8 +124,7 @@ export const api = {
|
||||
deleteUser: (id: number) => apiFetch<void>(`/users/${id}`, { method: "DELETE" }),
|
||||
|
||||
listLibraries: () => apiFetch<Library[]>("/libraries"),
|
||||
createLibrary: (name: string, root_path: string) =>
|
||||
apiFetch<Library>("/libraries", { method: "POST", body: { name, root_path } }),
|
||||
createLibrary: (name: string) => apiFetch<Library>("/libraries", { method: "POST", body: { name } }),
|
||||
scanLibrary: (id: number) => apiFetch<{ accepted: boolean }>(`/libraries/${id}/scan`, { method: "POST" }),
|
||||
uploadBook: (id: number, file: File) => {
|
||||
const fd = new FormData();
|
||||
|
||||
Reference in New Issue
Block a user