diff options
author | Ethan Koenig <ethantkoenig@gmail.com> | 2017-09-03 01:20:24 -0700 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-09-03 11:20:24 +0300 |
commit | b689bb61804fddfd2df8df7250522b0fc227484e (patch) | |
tree | 6cd96dfc3c0c7b2a0b265217f2893aa606307b0a /routers/admin | |
parent | 79f7839633167bbb146a7b0d17ce0ec1c990d085 (diff) | |
download | gitea-b689bb61804fddfd2df8df7250522b0fc227484e.tar.gz gitea-b689bb61804fddfd2df8df7250522b0fc227484e.zip |
Webhooks for repo creation/deletion (#1663)
* Webhooks for repo creation/deletion
* add createHookTask
* Add handles for GetSlackPayload and GetDiscordPayload
Diffstat (limited to 'routers/admin')
-rw-r--r-- | routers/admin/admin.go | 2 | ||||
-rw-r--r-- | routers/admin/repos.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go index d439544c8b..94b88a05c3 100644 --- a/routers/admin/admin.go +++ b/routers/admin/admin.go @@ -145,7 +145,7 @@ func Dashboard(ctx *context.Context) { err = models.DeleteRepositoryArchives() case cleanMissingRepos: success = ctx.Tr("admin.dashboard.delete_missing_repos_success") - err = models.DeleteMissingRepositories() + err = models.DeleteMissingRepositories(ctx.User) case gitGCRepos: success = ctx.Tr("admin.dashboard.git_gc_repos_success") err = models.GitGcRepos() diff --git a/routers/admin/repos.go b/routers/admin/repos.go index 7f885b34c9..12df6fba1e 100644 --- a/routers/admin/repos.go +++ b/routers/admin/repos.go @@ -39,7 +39,7 @@ func DeleteRepo(ctx *context.Context) { return } - if err := models.DeleteRepository(repo.MustOwner().ID, repo.ID); err != nil { + if err := models.DeleteRepository(ctx.User, repo.MustOwner().ID, repo.ID); err != nil { ctx.Handle(500, "DeleteRepository", err) return } |