diff options
Diffstat (limited to 'internal/route/lfs')
-rw-r--r-- | internal/route/lfs/route.go | 2 | ||||
-rw-r--r-- | internal/route/lfs/route_test.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/internal/route/lfs/route.go b/internal/route/lfs/route.go index 0fd9617b..388dde0c 100644 --- a/internal/route/lfs/route.go +++ b/internal/route/lfs/route.go @@ -72,7 +72,7 @@ func authenticate() macaron.Handler { // If username and password authentication failed, try again using username as an access token. if auth.IsErrBadCredentials(err) { - token, err := db.AccessTokens.GetBySHA(username) + token, err := db.AccessTokens.GetBySHA1(username) if err != nil { if db.IsErrAccessTokenNotExist(err) { askCredentials(c.Resp) diff --git a/internal/route/lfs/route_test.go b/internal/route/lfs/route_test.go index 9571c89d..119b925e 100644 --- a/internal/route/lfs/route_test.go +++ b/internal/route/lfs/route_test.go @@ -75,7 +75,7 @@ func Test_authenticate(t *testing.T) { }, }, mockAccessTokensStore: &db.MockAccessTokensStore{ - MockGetBySHA: func(sha string) (*db.AccessToken, error) { + MockGetBySHA1: func(sha string) (*db.AccessToken, error) { return nil, db.ErrAccessTokenNotExist{} }, }, @@ -120,7 +120,7 @@ func Test_authenticate(t *testing.T) { }, }, mockAccessTokensStore: &db.MockAccessTokensStore{ - MockGetBySHA: func(sha string) (*db.AccessToken, error) { + MockGetBySHA1: func(sha string) (*db.AccessToken, error) { return &db.AccessToken{}, nil }, MockSave: func(t *db.AccessToken) error { |