func addWizardRoutes(router *routes.Router) { wizardsPath := "/wizards" router.Path(wizardsPath).HandlerFunc(getAllWizardsHandler).Methods("GET") router.Path(wizardsPath).HandlerFunc(addWizardHandler).Methods("POST") router.Path(path.Join(wizardsPath, "/{id}")).HandlerFunc(getWizardHandler).Methods("GET") router.Path(path.Join(wizardsPath, "/{id}")).HandlerFunc(modifyWizardHandler).Methods("POST") }
func addUserRoutes(router *routes.Router) { router.Path(usersPath).HandlerFunc(getAllUsersHandler).Methods("GET") router.Path(usersPath).HandlerFunc(addUserHandler).Methods("POST") router.Path(path.Join(usersPath, "/{id:[0-9]+}")).HandlerFunc(getUserHandler).Methods("GET") router.Path(path.Join(usersPath, "/{id:[0-9]+}")).HandlerFunc(modifyUserHandler).Methods("POST", "PUT") }