diff options
Diffstat (limited to 'routers/routes/routes.go')
-rw-r--r-- | routers/routes/routes.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/routes/routes.go b/routers/routes/routes.go index 3eaaff60b6..8c196d8bb2 100644 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -79,7 +79,7 @@ func NewMacaron() *macaron.Macaron { }, )) - m.Use(templates.Renderer()) + m.Use(templates.HTMLRenderer()) models.InitMailRender(templates.Mailer()) localeNames, err := options.Dir("locale") @@ -755,6 +755,10 @@ func RegisterRoutes(m *macaron.Macaron) { m.Post("/purge", user.NotificationPurgePost) }, reqSignIn) + if setting.API.EnableSwagger { + m.Get("/swagger.v1.json", templates.JSONRenderer(), routers.SwaggerV1Json) + } + m.Group("/api", func() { apiv1.RegisterRoutes(m) }, ignSignIn) |