|
|
@ -287,7 +287,7 @@ func SettingsEmailPost(ctx *context.Context, form auth.AddEmailForm) { |
|
|
|
|
|
|
|
|
|
|
|
// DeleteEmail response for delete user's email
|
|
|
|
// DeleteEmail response for delete user's email
|
|
|
|
func DeleteEmail(ctx *context.Context) { |
|
|
|
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) |
|
|
|
ctx.Handle(500, "DeleteEmail", err) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
@ -422,7 +422,7 @@ func SettingsApplicationsPost(ctx *context.Context, form auth.NewAccessTokenForm |
|
|
|
|
|
|
|
|
|
|
|
// SettingsDeleteApplication response for delete user access token
|
|
|
|
// SettingsDeleteApplication response for delete user access token
|
|
|
|
func SettingsDeleteApplication(ctx *context.Context) { |
|
|
|
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()) |
|
|
|
ctx.Flash.Error("DeleteAccessTokenByID: " + err.Error()) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
ctx.Flash.Success(ctx.Tr("settings.delete_token_success")) |
|
|
|
ctx.Flash.Success(ctx.Tr("settings.delete_token_success")) |
|
|
|