소스 검색

move body parser

adrien2p 2 년 전
부모
커밋
8195ec0721
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/api/routes/admin/index.ts

+ 1 - 1
src/api/routes/admin/index.ts

@@ -6,7 +6,7 @@ import { authenticate, wrapHandler } from "@medusajs/medusa";
 
 const adminRouter = Router()
 export function getAdminRouter(adminCorsOptions): Router {
-  adminRouter.use("/admin", cors(adminCorsOptions), authenticate(), bodyParser.json())
+  adminRouter.use("/admin", cors(adminCorsOptions), bodyParser.json(), authenticate())
 
   adminRouter.post(
     "/my-custom-path",