feat(page): add Page action endpoints
build / Go-Build (push) Successful in 1m26s
build / Go-Build (pull_request) Successful in 1m27s

This commit is contained in:
2026-05-27 23:07:35 +02:00
parent 664ae1f7d3
commit 70e14ec63c
2 changed files with 96 additions and 0 deletions
+16
View File
@@ -43,6 +43,22 @@ func PrepareHTTP() {
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
})
registerAuthorizedFunc("/svg/{id}/page/", func(w http.ResponseWriter, r *http.Request) {
if r.Method != "POST" {
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
return
}
routes.AddPage(w, r)
})
registerAuthorizedFunc("/svg/{id}/page/{page}", func(w http.ResponseWriter, r *http.Request) {
if r.Method != "DELETE" {
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
return
}
routes.DeletePage(w, r)
})
registerAuthorizedFunc("/font/", func(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case "GET":