From 40c473d2130d5a609e678a153c19139863e43387 Mon Sep 17 00:00:00 2001 From: xmdhs Date: Sun, 10 Sep 2023 17:17:09 +0800 Subject: [PATCH] fix route path --- handle/yggdrasil/user.go | 1 + server/route/route.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/handle/yggdrasil/user.go b/handle/yggdrasil/user.go index 0c90966..3f96b79 100644 --- a/handle/yggdrasil/user.go +++ b/handle/yggdrasil/user.go @@ -132,6 +132,7 @@ func (y *Yggdrasil) GetProfile() httprouter.Handle { case "true": case "false": unsignedBool = false + case "": default: y.logger.DebugContext(ctx, "unsigned 参数类型错误") handleYgError(ctx, w, yggdrasil.Error{ErrorMessage: "unsigned 参数类型错误"}, 400) diff --git a/server/route/route.go b/server/route/route.go index 7db20eb..c11cb67 100644 --- a/server/route/route.go +++ b/server/route/route.go @@ -32,7 +32,7 @@ func newYggdrasil(r *httprouter.Router, handelY yggdrasil.Yggdrasil) error { r.PUT("/api/yggdrasil/api/user/profile/:uuid/:textureType", handelY.PutTexture()) r.DELETE("/api/yggdrasil/api/user/profile/:uuid/:textureType", warpHJSON(handelY.DelTexture())) - r.GET("/sessionserver/session/minecraft/profile/:uuid", handelY.GetProfile()) + r.GET("/api/yggdrasil/sessionserver/session/minecraft/profile/:uuid", handelY.GetProfile()) r.GET("/api/yggdrasil", func(w http.ResponseWriter, r *http.Request, p httprouter.Params) { w.Write([]byte(`{