mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Support LiuYun account login https://github.com/siyuan-note/siyuan/issues/8578
This commit is contained in:
parent
4459413493
commit
5f13dea7af
2 changed files with 11 additions and 15 deletions
|
|
@ -82,12 +82,8 @@ func deactivateUser(c *gin.Context) {
|
|||
|
||||
func login(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
ret.Code = -1
|
||||
|
||||
arg := map[string]interface{}{}
|
||||
if err := c.BindJSON(&arg); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = "parses request failed"
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
c.JSON(http.StatusOK, ret)
|
||||
return
|
||||
}
|
||||
|
|
@ -96,10 +92,6 @@ func login(c *gin.Context) {
|
|||
password := arg["userPassword"].(string)
|
||||
captcha := arg["captcha"].(string)
|
||||
cloudRegion := int(arg["cloudRegion"].(float64))
|
||||
result, err := model.Login(name, password, captcha, cloudRegion)
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, result)
|
||||
ret = model.Login(name, password, captcha, cloudRegion)
|
||||
c.JSON(http.StatusOK, ret)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue