1
0
mirror of https://github.com/fumiama/paper-manager.git synced 2026-06-07 17:00:23 +08:00

finish upload avatar

This commit is contained in:
源文雨
2023-03-18 00:25:19 +08:00
parent cd571e9e25
commit a072cfe1cf
18 changed files with 268 additions and 72 deletions

View File

@@ -18,7 +18,7 @@ func IP(r *http.Request) string {
// IsMethod check if the method meets the requirement
// and response 405 Method Not Allowed if not matched
func IsMethod(m string, w http.ResponseWriter, r *http.Request) bool {
logrus.Infoln("[utils.IsMethod]\t accept", IP(r), r.Method, r.URL)
logrus.Infoln("[utils.IsMethod] accept", IP(r), r.Method, r.URL)
if r.Method != m {
http.Error(w, "405 Method Not Allowed", http.StatusMethodNotAllowed)
return false