mirror of
https://github.com/fumiama/paper-manager.git
synced 2026-06-07 00:40:24 +08:00
优化后端api命名
This commit is contained in:
@@ -179,8 +179,8 @@ func init() {
|
||||
}}
|
||||
}
|
||||
|
||||
// Handler serves all backend /api call
|
||||
func Handler(w http.ResponseWriter, r *http.Request) {
|
||||
// APIHandler serves all backend /api call
|
||||
func APIHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if r.URL.Path[0] != '/' {
|
||||
r.URL.Path = "/" + r.URL.Path
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user