code optimization

This commit is contained in:
yuli
2024-08-13 23:00:10 +03:00
parent cd5794e6ff
commit a6c1f5e7ad
6 changed files with 17 additions and 31 deletions

View File

@@ -114,8 +114,7 @@ func (e mainEnv) getUserRequest(w http.ResponseWriter, r *http.Request, ps httpr
if len(userTOKEN) != 0 {
event.Record = userTOKEN
}
authResult := e.enforceAuth(w, r, event)
if authResult == "" {
if e.enforceAdmin(w, r) == "" {
return
}
change := getStringValue(requestInfo["change"])