()
| 638 | } |
| 639 | |
| 640 | func (h *SettingsHandler) DeleteApplication() macaron.Handler { |
| 641 | return func(c *context.Context) { |
| 642 | if err := h.store.DeleteAccessTokenByID(c.Req.Context(), c.User.ID, c.QueryInt64("id")); err != nil { |
| 643 | c.Flash.Error("DeleteAccessTokenByID: " + err.Error()) |
| 644 | } else { |
| 645 | c.Flash.Success(c.Tr("settings.delete_token_success")) |
| 646 | } |
| 647 | |
| 648 | c.JSONSuccess(map[string]any{ |
| 649 | "redirect": conf.Server.Subpath + "/user/settings/applications", |
| 650 | }) |
| 651 | } |
| 652 | } |
| 653 | |
| 654 | func SettingsDelete(c *context.Context) { |
| 655 | c.Title("settings.delete") |
no test coverage detected