diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -51,8 +51,13 @@ func main() { { user.Routes(api) auth.Routes(api) - customer.Routes(api) - item.Routes(api) + } + + protected := api.Group("/") + protected.Use(auth.Authorize()) + { + customer.Routes(protected) + item.Routes(protected) } r.Run(":" + viper.GetString("port")) |