Created
June 25, 2018 09:27
-
-
Save aquaibm/b52c14fd2face487e4732678faef47db 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
public func routes(_ router: Router) throws { | |
let uCtrller = UserController() | |
let usersRouter = router.grouped("api","users") | |
usersRouter.get("subscribetopics",Int.parameter, use: uCtrller.getSubscribeTopics) | |
usersRouter.post(SiblingPair.self, at: "subscribe", use: uCtrller.subscribe) | |
let tpCtrller = TopicController() | |
let topicsRouter = router.grouped("api","topics") | |
topicsRouter.get("subscribers",String.parameter, use: tpCtrller.getTopicSubscriber) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment