summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-02-02 07:33:56 -0500
committerLunny Xiao <xiaolunwen@gmail.com>2017-02-02 20:33:56 +0800
commit73d05a51e3dce4a5b31b8660a6141a14ae615404 (patch)
tree16eb200197c0ae8458812d187184fee696c7c858 /routers/api/v1/api.go
parentd7d094bd8a5520b758f34d3fb0439c6a1ddb39d3 (diff)
downloadgitea-73d05a51e3dce4a5b31b8660a6141a14ae615404.tar.gz
gitea-73d05a51e3dce4a5b31b8660a6141a14ae615404.zip
Remove unneeded database loads (#814)
Remove unnecessary calls to repo.GetOwner() in context handlers
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 67912e15d7..07180c9a5c 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -57,10 +57,8 @@ func repoAssignment() macaron.Handler {
ctx.Error(500, "GetRepositoryByName", err)
}
return
- } else if err = repo.GetOwner(); err != nil {
- ctx.Error(500, "GetOwner", err)
- return
}
+ repo.Owner = owner
if ctx.IsSigned && ctx.User.IsAdmin {
ctx.Repo.AccessMode = models.AccessModeOwner