Skip to content

Commit 8e5b447

Browse files
committed
style(server): fix routes.js styling
1 parent bd658ed commit 8e5b447

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

Diff for: templates/app/server/routes.js

+11-12
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@ import errors from './components/errors';
88
import path from 'path';
99

1010
export default function(app) {
11-
// Insert routes below<% if (filters.auth) { %>
12-
app.use('/api/users', require('./api/user'));
11+
// Insert routes below<% if(filters.auth) { %>
12+
app.use('/api/users', require('./api/user'));
13+
app.use('/auth', require('./auth').default);<% } %>
1314

14-
app.use('/auth', require('./auth').default);
15-
<% } %>
16-
// All undefined asset or api routes should return a 404
17-
app.route('/:url(api|auth|components|app|bower_components|assets)/*')
18-
.get(errors[404]);
15+
// All undefined asset or api routes should return a 404
16+
app.route('/:url(api|auth|components|app|bower_components|assets)/*')
17+
.get(errors[404]);
1918

20-
// All other routes should redirect to the index.html
21-
app.route('/*')
22-
.get((req, res) => {
23-
res.sendFile(path.resolve(app.get('appPath') + '/index.html'));
24-
});
19+
// All other routes should redirect to the index.html
20+
app.route('/*')
21+
.get((req, res) => {
22+
res.sendFile(path.resolve(app.get('appPath') + '/index.html'));
23+
});
2524
}

0 commit comments

Comments
 (0)