mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-11-07 15:19:44 +00:00
wip
This commit is contained in:
parent
71bb7432cd
commit
2391a305be
@ -36,6 +36,12 @@ func PostUserRegister(c *gin.Context) {
|
|||||||
username := json["user_name"]
|
username := json["user_name"]
|
||||||
pwd := json["password"]
|
pwd := json["password"]
|
||||||
|
|
||||||
|
// @tiger - 尽量统一用 JSON 本体来传参。用 query string 来传参的话,
|
||||||
|
// 1 - 有可能会被路由记录,形成不必要的泄露
|
||||||
|
// 2 - 开发者不需要处理两种入参方式
|
||||||
|
//
|
||||||
|
// query string 更加适合运维层面的需求,比如跟踪码,回调地址等
|
||||||
|
|
||||||
key := c.Param("key")
|
key := c.Param("key")
|
||||||
if _, ok := service.UserRegisterHash[key]; !ok {
|
if _, ok := service.UserRegisterHash[key]; !ok {
|
||||||
c.JSON(http.StatusOK,
|
c.JSON(http.StatusOK,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user