Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hasa1K committed Mar 22, 2024
1 parent 5a64856 commit 0a7d553
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/dms/biz/access_token.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package biz

import (
"context"
"fmt"
"net/http"

Expand All @@ -21,7 +20,7 @@ type AuthAccessTokenUsecase struct {
func NewAuthAccessTokenUsecase(log utilLog.Logger, usecase *UserUsecase) *AuthAccessTokenUsecase {
au := &AuthAccessTokenUsecase{
userUsecase: usecase,
log: utilLog.NewHelper(log, utilLog.WithMessageKey("biz.license")),
log: utilLog.NewHelper(log, utilLog.WithMessageKey("biz.accesstoken")),
}
return au
}
Expand Down Expand Up @@ -53,7 +52,7 @@ func (au *AuthAccessTokenUsecase) CheckLatestAccessToken() echo.MiddlewareFunc {
return echo.NewHTTPError(http.StatusUnauthorized, "access token login type is error")
}
uidStr := fmt.Sprintf("%v", claims[jwtPkg.JWTUserId])
accessTokenInfo, err := au.userUsecase.repo.GetAccessTokenByUser(context.TODO(), uidStr)
accessTokenInfo, err := au.userUsecase.repo.GetAccessTokenByUser(c.Request().Context(), uidStr)
if err != nil {
return err
}
Expand Down

0 comments on commit 0a7d553

Please sign in to comment.