Skip to content

Commit 05b1416

Browse files
committed
♻️ refactor: refactor routes #2
1 parent 746323f commit 05b1416

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

internal/core/routes.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,23 @@ import (
77
)
88

99
func (c *CoreCommand) routes(e *gin.Engine) {
10+
c.wizard(e)
1011
c.shared(e)
1112
c.protected(e)
1213
}
1314

14-
// Collection of authenticated endpoints
15-
func (c *CoreCommand) protected(e *gin.Engine) {
15+
// Collection of documented endpoints
16+
func (c *CoreCommand) wizard(e *gin.Engine) {
1617
v1 := e.Group("/api/v1")
1718
v1.GET("/swagger/index.html", ginSwagger.WrapHandler(
1819
swaggerFiles.Handler,
1920
ginSwagger.DefaultModelsExpandDepth(-1),
2021
))
22+
}
23+
24+
// Collection of authenticated endpoints
25+
func (c *CoreCommand) protected(e *gin.Engine) {
26+
v1 := e.Group("/api/v1")
2127

2228
c.handlers.commonHandler.Router(v1.Group("/common"), c.handlers.middlewares)
2329
}

0 commit comments

Comments
 (0)