mirror of
https://github.com/fumiama/paper-manager.git
synced 2026-06-10 10:50:23 +08:00
funish dynamic info
This commit is contained in:
@@ -268,6 +268,20 @@ func init() {
|
||||
}
|
||||
writeresult(w, codeSuccess, "成功", messageOk, typeSuccess)
|
||||
}}
|
||||
|
||||
apimap["/api/delMessage"] = &apihandler{"GET", func(w http.ResponseWriter, r *http.Request) {
|
||||
id, err := strconv.Atoi(r.URL.Query().Get("id"))
|
||||
if err != nil {
|
||||
writeresult(w, codeError, nil, err.Error(), typeError)
|
||||
return
|
||||
}
|
||||
err = delMessage(r.Header.Get("Authorization"), id)
|
||||
if err != nil {
|
||||
writeresult(w, codeError, nil, err.Error(), typeError)
|
||||
return
|
||||
}
|
||||
writeresult(w, codeSuccess, "成功", messageOk, typeSuccess)
|
||||
}}
|
||||
}
|
||||
|
||||
// APIHandler serves all backend /api call
|
||||
|
||||
Reference in New Issue
Block a user