From 2391a305be6f6f44a9f82798bd622583926e8c07 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Thu, 7 Jul 2022 11:27:26 -0400 Subject: [PATCH] wip --- route/v1/user.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/route/v1/user.go b/route/v1/user.go index e664c38..9e90704 100644 --- a/route/v1/user.go +++ b/route/v1/user.go @@ -36,6 +36,12 @@ func PostUserRegister(c *gin.Context) { username := json["user_name"] pwd := json["password"] + // @tiger - 尽量统一用 JSON 本体来传参。用 query string 来传参的话, + // 1 - 有可能会被路由记录,形成不必要的泄露 + // 2 - 开发者不需要处理两种入参方式 + // + // query string 更加适合运维层面的需求,比如跟踪码,回调地址等 + key := c.Param("key") if _, ok := service.UserRegisterHash[key]; !ok { c.JSON(http.StatusOK,