Skip to content

Commit

Permalink
bug fix: no token
Browse files Browse the repository at this point in the history
  • Loading branch information
liuqing6767 committed Dec 9, 2021
1 parent 81a36df commit 316e89f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions storage/rdb/auth/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ func (ps *RDBAuthorizeStorager) FetchTokenProduct(ctx context.Context, token *ia
}

func (ps *RDBAuthorizeStorager) BatchFetchTokenProduct(ctx context.Context, tokens []*iauth.Token) (map[int64]*ibasic.Product, error) {
if len(tokens) == 0 {
return map[int64]*ibasic.Product{}, nil
}

dbCtx, err := ps.dbCtxFactory(ctx)
if err != nil {
return nil, err
Expand Down

0 comments on commit 316e89f

Please sign in to comment.