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:
2026-09-07 21:56:59 +08:00
parent ca64bc0d73
commit 45eefd6741
9 changed files with 80 additions and 146 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ func newLibrary(t *testing.T, st *store.Store, h http.Handler, tok, booksDir, na
t.Helper()
root := filepath.Join(booksDir, name)
os.MkdirAll(filepath.Join(root, "series-a"), 0o755)
w := do(h, "POST", "/api/libraries", tok, map[string]string{"name": name, "root_path": root})
w := do(h, "POST", "/api/libraries", tok, map[string]string{"name": name})
if w.Code != 201 {
t.Fatalf("create lib %d %s", w.Code, w.Body)
}