Skip to content

Commit

Permalink
Merge pull request #568 from traPtitech/fix-ci
Browse files Browse the repository at this point in the history
🎨 add setup-go in lint
  • Loading branch information
iChemy authored Oct 4, 2024
2 parents 6ebf399 + 5ac48d9 commit 9296cc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- uses: golangci/golangci-lint-action@v6
with:
version: latest
Expand Down
4 changes: 2 additions & 2 deletions router/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
func (h *Handlers) HandleGetUserMe(c echo.Context) error {
user, err := h.Repo.GetUserMe(getConinfo(c))
if err != nil {
if errors.Is(domain.ErrInvalidToken, err) {
if errors.Is(err, domain.ErrInvalidToken) {
return forbidden(err, message("token is invalid."), needAuthorization(true))
}
return judgeErrorResponse(err)
Expand All @@ -30,7 +30,7 @@ func (h *Handlers) HandleGetUsers(c echo.Context) error {

users, err := h.Repo.GetAllUsers(includeSuspend, true, getConinfo(c))
if err != nil {
if errors.Is(domain.ErrInvalidToken, err) {
if errors.Is(err, domain.ErrInvalidToken) {
return forbidden(err, message("token is invalid."), needAuthorization(true))
}
return judgeErrorResponse(err)
Expand Down

0 comments on commit 9296cc9

Please sign in to comment.