feat: add a new REST endpoint - GET /api/v1/user
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Dawid Wysokiński 2022-11-21 06:52:27 +01:00
parent 6a243878a0
commit 642c49fe75
Signed by: Kichiyaki
GPG Key ID: B5445E357FB8B892
1 changed files with 6 additions and 2 deletions

View File

@ -61,8 +61,12 @@ func NewRouter(cfg RouterConfig) *chi.Mux {
router.Route("/v1", func(r chi.Router) {
if cfg.Swagger.Enabled {
docs.SwaggerInfo.Host = cfg.Swagger.Host
docs.SwaggerInfo.Schemes = cfg.Swagger.Schemes
if cfg.Swagger.Host != "" {
docs.SwaggerInfo.Host = cfg.Swagger.Host
}
if len(cfg.Swagger.Schemes) > 0 {
docs.SwaggerInfo.Schemes = cfg.Swagger.Schemes
}
r.Get("/swagger/*", httpSwagger.Handler())
}