mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 04:10:20 +08:00
Use c.ResponseError() for all places.
This commit is contained in:
@ -44,9 +44,7 @@ func (c *ApiController) Unlink() {
|
||||
value := object.GetUserField(user, providerType)
|
||||
|
||||
if value == "" {
|
||||
resp = Response{Status: "error", Msg: "Please link first", Data: value}
|
||||
c.Data["json"] = resp
|
||||
c.ServeJSON()
|
||||
c.ResponseError("Please link first", value)
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user