diff options
| author | Teddy Wing | 2013-04-28 14:36:03 -0400 |
|---|---|---|
| committer | Teddy Wing | 2013-04-28 14:36:03 -0400 |
| commit | 1c57161d94906820b0dc9dce23d8b5d8e9b181d1 (patch) | |
| tree | 5516464872e3e5d92ae97ba7395028c042f88694 /routes | |
| parent | 5352d970ba2982ea0e525ffdc4b84b730f2afcf7 (diff) | |
| download | Who-am-I-1c57161d94906820b0dc9dce23d8b5d8e9b181d1.tar.bz2 | |
When you pick a character, show a dialog
The dialog contains a message based on whether or not you had the
correct answer.
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/character-chosen-dialog.js | 11 | ||||
| -rw-r--r-- | routes/index.js | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/routes/character-chosen-dialog.js b/routes/character-chosen-dialog.js new file mode 100644 index 0000000..db5a6c0 --- /dev/null +++ b/routes/character-chosen-dialog.js @@ -0,0 +1,11 @@ +module.exports = function(req, res) { + this.success = req.params.success; + + this.data = { + success: this.success, + character_name: req.query.character_name, + character_image_url: req.query.character_image_url + }; + + res.render('character-chosen-dialog', this.data); +};
\ No newline at end of file diff --git a/routes/index.js b/routes/index.js index f0d7c86..20333b5 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,7 +1,9 @@ module.exports = function(app) { var index = require('./home') - , character_images = require('./character-images'); + , character_images = require('./character-images') + , character_chosen_dialog = require('./character-chosen-dialog'); app.get('/', index); app.get('/character-images/:series_id', character_images); + app.get('/character-chosen/:success', character_chosen_dialog); };
\ No newline at end of file |
