aboutsummaryrefslogtreecommitdiff
path: root/models/token.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/token.go')
-rw-r--r--models/token.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/models/token.go b/models/token.go
index 6c4328e5..852a910f 100644
--- a/models/token.go
+++ b/models/token.go
@@ -5,17 +5,12 @@
package models
import (
- "errors"
"time"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/uuid"
)
-var (
- ErrAccessTokenNotExist = errors.New("Access token does not exist")
-)
-
// AccessToken represents a personal access token.
type AccessToken struct {
ID int64 `xorm:"pk autoincr"`
@@ -42,7 +37,7 @@ func GetAccessTokenBySHA(sha string) (*AccessToken, error) {
if err != nil {
return nil, err
} else if !has {
- return nil, ErrAccessTokenNotExist
+ return nil, ErrAccessTokenNotExist{sha}
}
return t, nil
}