fix(api): mc_uuid 统一校验为 UUID,非法值返回 400 bad_mc_uuid 并按规范形式存储
This commit is contained in:
13 files changed
+159
-35
No files matched your search
@@ -66,7 +66,7 @@ func (a *API) handleAllowlistSetWake(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
id, err := uuid.Parse(r.PathValue("uuid"))
|
||||
if err != nil {
|
||||
writeError(w, r, newError(http.StatusBadRequest, "bad_request", "invalid Minecraft UUID"))
|
||||
writeError(w, r, errBadMCUUID)
|
||||
return
|
||||
}
|
||||
var req allowlistWakeRequest
|
||||
|
||||
Reference in new issue
Block a user