We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9dfdf80 commit 06a1739Copy full SHA for 06a1739
routers/user/setting/security.go
@@ -34,10 +34,15 @@ func Security(ctx *context.Context) {
34
35
// DeleteAccountLink delete a single account link
36
func DeleteAccountLink(ctx *context.Context) {
37
- if _, err := models.RemoveAccountLink(ctx.User, ctx.QueryInt64("loginSourceID")); err != nil {
38
- ctx.Flash.Error("RemoveAccountLink: " + err.Error())
+ id := ctx.QueryInt64("id")
+ if id <= 0 {
39
+ ctx.Flash.Error("Account link id is not given")
40
} else {
- ctx.Flash.Success(ctx.Tr("settings.remove_account_link_success"))
41
+ if _, err := models.RemoveAccountLink(ctx.User, id); err != nil {
42
+ ctx.Flash.Error("RemoveAccountLink: " + err.Error())
43
+ } else {
44
+ ctx.Flash.Success(ctx.Tr("settings.remove_account_link_success"))
45
+ }
46
}
47
48
ctx.JSON(200, map[string]interface{}{
0 commit comments