Created
February 15, 2016 14:18
-
-
Save chuck0523/919e2044d610a3292916 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = (function() { | |
'use strict'; | |
const Nodal = require('nodal'); | |
const Word = Nodal.require('app/models/word.js'); | |
class TopController extends Nodal.Controller { | |
get() { | |
Word.find(1, (err, word) => { | |
this.render( | |
Nodal.Template.generate('layout.html', 'top.html').render( | |
this.params, | |
{ | |
test: this.params.query.test, | |
name: 'After900', | |
word: word['_data'] | |
} | |
) | |
); | |
}); | |
} | |
post() { | |
this.render(); | |
} | |
put() { | |
this.render(); | |
} | |
del() { | |
this.render(); | |
} | |
} | |
return TopController; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment