Skip to content

Commit

Permalink
Moved root page template to feature directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Tavares committed Sep 16, 2015
1 parent dc6dbe5 commit 6231e81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/features/root/root-routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
'use strict';
var debug = require('debug')('swagger-val:root');
var express = require('express');
var routeResult = require('../../lib/route-result');
var path = require('path');

var rootTemplate = path.join(__dirname, 'root');

var router = express.Router();

router.get('/', function (req, res) {
router.get('/', function (req, res, next) {
debug('trying to render root template');
res.render('index', { message: req.flash('message') });
});
req.result = routeResult.render(rootTemplate, { message: req.flash('message') });
next();
}, routeResult.execute);;

router.get('/favicon.ico', function (req, res) {
res.status(404).end();
Expand Down
File renamed without changes.

0 comments on commit 6231e81

Please sign in to comment.