diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-11-09 04:54:50 +0800 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-11-08 15:54:50 -0500 |
commit | 016a5d0438e551d4630819683dd6dc4fccb0cb51 (patch) | |
tree | be5adb9e41fdd3e0b1528cca0c9e111ff81b4eb7 /routers/api/v1/repo | |
parent | fb459f2c2c32dda29870731b6dae1452bbab625f (diff) | |
download | gitea-016a5d0438e551d4630819683dd6dc4fccb0cb51.tar.gz gitea-016a5d0438e551d4630819683dd6dc4fccb0cb51.zip |
Move some actions to notification/action (#8779)
* Move some actions to notification/action
* Fix test
* fix test
Diffstat (limited to 'routers/api/v1/repo')
-rw-r--r-- | routers/api/v1/repo/repo.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index 422bb0ac3a..d366435a2f 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -603,11 +603,7 @@ func updateBasicProperties(ctx *context.APIContext, opts api.EditRepoOption) err return err } - if err := models.RenameRepoAction(ctx.User, oldRepoName, repo); err != nil { - log.Error("RenameRepoAction: %v", err) - ctx.Error(http.StatusInternalServerError, "RenameRepoActions", err) - return err - } + notification.NotifyRenameRepository(ctx.User, repo, oldRepoName) log.Trace("Repository name changed: %s/%s -> %s", ctx.Repo.Owner.Name, repo.Name, newRepoName) } |