mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-10 12:50:29 +08:00
fix: return right after error response on GetUserInfo (#707)
This commit is contained in:
@@ -210,7 +210,7 @@ func (c *ApiController) Signup() {
|
|||||||
record := object.NewRecord(c.Ctx)
|
record := object.NewRecord(c.Ctx)
|
||||||
record.Organization = application.Organization
|
record.Organization = application.Organization
|
||||||
record.User = user.Name
|
record.User = user.Name
|
||||||
util.SafeGoroutine(func() {object.AddRecord(record)})
|
util.SafeGoroutine(func() { object.AddRecord(record) })
|
||||||
|
|
||||||
userId := fmt.Sprintf("%s/%s", user.Owner, user.Name)
|
userId := fmt.Sprintf("%s/%s", user.Owner, user.Name)
|
||||||
util.LogInfo(c.Ctx, "API: [%s] is signed up as new user", userId)
|
util.LogInfo(c.Ctx, "API: [%s] is signed up as new user", userId)
|
||||||
@@ -285,6 +285,7 @@ func (c *ApiController) GetUserinfo() {
|
|||||||
resp, err := object.GetUserInfo(userId, scope, aud, host)
|
resp, err := object.GetUserInfo(userId, scope, aud, host)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.ResponseError(err.Error())
|
c.ResponseError(err.Error())
|
||||||
|
return
|
||||||
}
|
}
|
||||||
c.Data["json"] = resp
|
c.Data["json"] = resp
|
||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
|
Reference in New Issue
Block a user