MCPcopy Create free account
hub / github.com/gogs/gogs / DeleteApplication

Method DeleteApplication

internal/route/user/setting.go:640–652  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

638}
639
640func (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
654func SettingsDelete(c *context.Context) {
655 c.Title("settings.delete")

Callers 1

runWebFunction · 0.95

Calls 5

SuccessMethod · 0.80
TrMethod · 0.80
JSONSuccessMethod · 0.80
DeleteAccessTokenByIDMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected