feat: Apply authentication middleware globally (#7396)
* feat: Apply auth middleware globally * feat: Remove local auth middleware where it makes sense
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { MiddlewareRoute } from "../../../loaders/helpers/routing/types"
|
||||
import { authenticate } from "../../../utils/middlewares/authenticate-middleware"
|
||||
import { validateAndTransformBody } from "../../utils/validate-body"
|
||||
import { validateAndTransformQuery } from "../../utils/validate-query"
|
||||
import * as QueryConfig from "./query-config"
|
||||
@@ -10,11 +9,6 @@ import {
|
||||
} from "./validators"
|
||||
|
||||
export const adminDraftOrderRoutesMiddlewares: MiddlewareRoute[] = [
|
||||
{
|
||||
method: ["ALL"],
|
||||
matcher: "/admin/draft-orders*",
|
||||
middlewares: [authenticate("user", ["bearer", "session", "api-key"])],
|
||||
},
|
||||
{
|
||||
method: ["GET"],
|
||||
matcher: "/admin/draft-orders",
|
||||
|
||||
Reference in New Issue
Block a user