This commit is contained in:
Tiger Wang 2022-07-07 11:27:26 -04:00
parent 71bb7432cd
commit 2391a305be

View File

@ -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,