Skip to content

Commit

Permalink
fix: admin api loader should register after the core auth router
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien2p committed Jan 6, 2023
1 parent f995d50 commit c5da2cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/loaders/admin-api.loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export async function adminApiLoader(
const adminAuthRouteLoader = await import('@medusajs/medusa/dist/api/routes/admin/auth');
const originalAdminAuthRouteLoader = adminAuthRouteLoader.default;
adminAuthRouteLoader.default = (app: Router): void => {
originalAdminAuthRouteLoader(app);
applyMiddlewares('admin', app, adminMiddlewares);
applyRouters('admin', app, adminRouters);
originalAdminAuthRouteLoader(app);
};
}

0 comments on commit c5da2cf

Please sign in to comment.