Skip to content

Commit bf8ccc7

Browse files
committed
🩹 linter対応
1 parent e25b94b commit bf8ccc7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/handler/v2/file_upload.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,8 @@ func isFileUploadRequest(c echo.Context) bool {
3030
}
3131

3232
reqPath := path.Clean(c.Request().URL.Path)
33-
if slices.Contains(targetPaths, reqPath) {
34-
return true
35-
}
3633

37-
return false
34+
return slices.Contains(targetPaths, reqPath)
3835
}
3936

4037
// fileUploadSkipper はファイルをアップロードするエンドポイントについてバリデーションをスキップする。
@@ -57,7 +54,7 @@ func (checker *Checker) fileUploadAuthMiddleware(next echo.HandlerFunc) echo.Han
5754

5855
// ref: [github.com/oapi-codegen/echo-middleware.GetEchoContext]
5956
// ここで echo.Context を context.Context に詰め込んでおかないと、GameMaintainerAuthChecker 内で取得できない。
60-
ctx := context.WithValue(c.Request().Context(), echomiddleware.EchoContextKey, c)
57+
ctx := context.WithValue(c.Request().Context(), echomiddleware.EchoContextKey, c) //nolint:staticcheck
6158

6259
err := checker.GameMaintainerAuthChecker(ctx, nil)
6360
if err != nil {

0 commit comments

Comments
 (0)