summaryrefslogtreecommitdiffstats
path: root/routers/repo/http.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-02 02:40:15 -0400
committerUnknwon <u@gogs.io>2015-09-02 02:40:15 -0400
commit2ac8e11f466f838ff34314c5e4e2785ebe2d036d (patch)
tree7dbf30a4d51d634f660f6bfa5814f4cfd53593de /routers/repo/http.go
parentebf1bd4f518971253e0a7a0e923645c1d584e03e (diff)
downloadgitea-2ac8e11f466f838ff34314c5e4e2785ebe2d036d.tar.gz
gitea-2ac8e11f466f838ff34314c5e4e2785ebe2d036d.zip
#842 able to use access token replace basic auth
Diffstat (limited to 'routers/repo/http.go')
-rw-r--r--routers/repo/http.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/http.go b/routers/repo/http.go
index 9c1f227391..52c9fbd39e 100644
--- a/routers/repo/http.go
+++ b/routers/repo/http.go
@@ -115,7 +115,7 @@ func Http(ctx *middleware.Context) {
// Assume username now is a token.
token, err := models.GetAccessTokenBySHA(authUsername)
if err != nil {
- if err == models.ErrAccessTokenNotExist {
+ if models.IsErrAccessTokenNotExist(err) {
ctx.HandleText(401, "invalid token")
} else {
ctx.Handle(500, "GetAccessTokenBySha", err)