feat(backend): book list/detail/delete with embedded progress + cache cleanup

This commit is contained in:
2026-09-05 00:42:08 +08:00
parent 193d7612b5
commit 249619b857
7 changed files with 339 additions and 26 deletions
+3 -2
View File
@@ -12,9 +12,10 @@ import (
)
func TestLibraryCreateListUpload(t *testing.T) {
_, h := setupAPI(t)
_, _, h, booksDir := setupAPI(t)
tok := adminToken(t, h)
root := t.TempDir()
root := filepath.Join(booksDir, "lib1") // 必须落在解析过软链的 booksDir 内
os.MkdirAll(root, 0o755)
w := do(h, "POST", "/api/libraries", tok, map[string]string{"name": "comics", "root_path": root})
if w.Code != 201 {
t.Fatalf("create lib %d %s", w.Code, w.Body)