Skip to content

Commit

Permalink
Merge pull request #6 from fabrix-app/v1.1
Browse files Browse the repository at this point in the history
[chore] fix route order for now
  • Loading branch information
scott-wyatt committed Jul 21, 2018
2 parents 1586efa + 8346485 commit f9b9f81
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ export const Server = {
*/
registerRoutes(app: FabrixApp, server: Express) {
// Sort the routes so that they are always in the correct express order.
const routes = app.routes
// Could be related to https://github.com/fabrix-app/spool-router/issues/6
const routes = new Map([...app.routes].reverse())
const express = app.config.get('web.express')
const expressRouter = express.Router
const router = expressRouter()
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fabrix/spool-express",
"version": "1.1.3",
"version": "1.1.4",
"description": "Spool Express - Binds the routes compiled in spool-router to a Express 4 Server.",
"homepage": "https://fabrix.app",
"author": "Fabrix-app Team <hello@fabrix.app>",
Expand Down
2 changes: 1 addition & 1 deletion test/integration/controller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe('express controllers', () => {
})
})
// TODO fix spool-router and come back to this
it.skip('should test order', (done) => {
it('should test order', (done) => {
request
.get('/test/earth')
.query({ where: {hello: 'world'}})
Expand Down

0 comments on commit f9b9f81

Please sign in to comment.