|
|
|
@ -287,7 +287,7 @@ func SettingsEmailPost(ctx *context.Context, form auth.AddEmailForm) { |
|
|
|
|
|
|
|
|
|
// DeleteEmail response for delete user's email
|
|
|
|
|
func DeleteEmail(ctx *context.Context) { |
|
|
|
|
if err := models.DeleteEmailAddress(&models.EmailAddress{ID: ctx.QueryInt64("id")}); err != nil { |
|
|
|
|
if err := models.DeleteEmailAddress(&models.EmailAddress{ID: ctx.QueryInt64("id"), UID: ctx.User.ID}); err != nil { |
|
|
|
|
ctx.Handle(500, "DeleteEmail", err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
@ -422,7 +422,7 @@ func SettingsApplicationsPost(ctx *context.Context, form auth.NewAccessTokenForm |
|
|
|
|
|
|
|
|
|
// SettingsDeleteApplication response for delete user access token
|
|
|
|
|
func SettingsDeleteApplication(ctx *context.Context) { |
|
|
|
|
if err := models.DeleteAccessTokenByID(ctx.QueryInt64("id")); err != nil { |
|
|
|
|
if err := models.DeleteAccessTokenByID(ctx.QueryInt64("id"), ctx.User.ID); err != nil { |
|
|
|
|
ctx.Flash.Error("DeleteAccessTokenByID: " + err.Error()) |
|
|
|
|
} else { |
|
|
|
|
ctx.Flash.Success(ctx.Tr("settings.delete_token_success")) |
|
|
|
|