feat(svg): added svg template delete endpoint
This commit is contained in:
@@ -22,11 +22,16 @@ func PrepareHTTP() {
|
||||
routes.CreateSVG(w, r)
|
||||
})
|
||||
registerAuthorizedFunc("/svg/{id}", func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != "GET" {
|
||||
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
|
||||
switch r.Method {
|
||||
case "GET":
|
||||
routes.DownloadSVG(w, r)
|
||||
return
|
||||
case "DELETE":
|
||||
routes.DeleteSvg(w, r)
|
||||
return
|
||||
}
|
||||
routes.DownloadSVG(w, r)
|
||||
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
|
||||
|
||||
})
|
||||
registerAuthorizedFunc("/font/", func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.Method {
|
||||
|
||||
Reference in New Issue
Block a user