Skip to content

Instantly share code, notes, and snippets.

@hieuhani
Last active August 24, 2018 02:57
Show Gist options
  • Save hieuhani/b3a06e4679e4566e29f754436e7757aa to your computer and use it in GitHub Desktop.
Save hieuhani/b3a06e4679e4566e29f754436e7757aa to your computer and use it in GitHub Desktop.
import PromiseRouter from './PromiseRouter'
function hello(req) {
const { authController } = req.config
return authController.sayHello()
}
export default class AuthRouter extends PromiseRouter {
mountRoutes() {
this.route('GET', '/hello', req => (hello(req)))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment