diff options
author | Unknwon <u@gogs.io> | 2015-09-02 02:40:15 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-02 02:40:15 -0400 |
commit | 2ac8e11f466f838ff34314c5e4e2785ebe2d036d (patch) | |
tree | 7dbf30a4d51d634f660f6bfa5814f4cfd53593de /routers/repo/http.go | |
parent | ebf1bd4f518971253e0a7a0e923645c1d584e03e (diff) | |
download | gitea-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.go | 2 |
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) |