1
0
mirror of https://github.com/fumiama/paper-manager.git synced 2026-06-22 19:40:36 +08:00

finish dashboard/anaylsis

This commit is contained in:
源文雨
2023-03-21 23:30:52 +08:00
parent 6269a9544f
commit f2a26a6067
5 changed files with 26 additions and 7 deletions

View File

@@ -13,12 +13,6 @@ func FileHandler(w http.ResponseWriter, r *http.Request) {
if !utils.IsMethod("GET", w, r) {
return
}
token := r.Header.Get("Authorization")
user := usertokens.Get(token)
if user == nil {
writeresult(w, codeError, nil, errInvalidToken.Error(), typeError)
return
}
global.UserDB.VisitAPI()
if r.URL.Path[0] != '/' {
r.URL.Path = "/" + r.URL.Path