mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Fixed order of routes
This commit is contained in:
parent
671346dc15
commit
529990cadf
1 changed files with 3 additions and 3 deletions
|
@ -31,6 +31,9 @@ module.exports = function setupApiApp() {
|
|||
// Admin API shouldn't be cached
|
||||
apiApp.use(shared.middleware.cacheControl('private'));
|
||||
|
||||
// Routing
|
||||
apiApp.use(routes());
|
||||
|
||||
const nestAppPromise = GhostNestApp.create().then(async (app) => {
|
||||
await app.init();
|
||||
return app;
|
||||
|
@ -41,9 +44,6 @@ module.exports = function setupApiApp() {
|
|||
app.getHttpAdapter().getInstance()(req, res, next);
|
||||
});
|
||||
|
||||
// Routing
|
||||
apiApp.use(routes());
|
||||
|
||||
// API error handling
|
||||
apiApp.use(errorHandler.resourceNotFound);
|
||||
apiApp.use(APIVersionCompatibilityService.errorHandler);
|
||||
|
|
Loading…
Add table
Reference in a new issue