Last active
April 17, 2018 18:12
-
-
Save marcus-sa/84b3f75649eb906b0e86c9df5000543f to your computer and use it in GitHub Desktop.
Titan controller & routing example
This file contains hidden or 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
import { Route } from 'Titan/Http/Routing' | |
@Route.group('threads') | |
export class ThreadController { | |
@Route.get(':id', { name: 'thread-comment' }) | |
async comment({ request, response, id }) { | |
// ... | |
Route.generate('thread-comment', { id: 1 }) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment