This commit is contained in:
Franz Schmidt authored and 无闻 committed 2016-06-27 17:02:39 +08:00
1 parent ac05f88641
commit 8b35c194ec
4 files changed
+17 -2

No files matched your search

+3
View File
@@ -56,6 +56,9 @@ func NewAccessToken(t *AccessToken) error {
// GetAccessTokenBySHA returns access token by given sha1.
func GetAccessTokenBySHA(sha string) (*AccessToken, error) {
if sha == "" {
return nil, ErrAccessTokenEmpty{}
}
t := &AccessToken{Sha1: sha}
has, err := x.Get(t)
if err != nil {