Skip to content

Commit

Permalink
add empty handler for / (#26)
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo <[email protected]>
  • Loading branch information
pabloaledo authored Jan 24, 2025
1 parent c21d700 commit 3e22182
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/app/cloudinfo/api/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func (r *RouteHandler) ConfigureRoutes(router *gin.Engine, basePath string) {
base := router.Group(basePath)

{
base.GET("/", r.signalEmpty)
base.GET("/status", r.signalStatus)
base.GET("/version", r.versionHandler)
}
Expand Down Expand Up @@ -92,6 +93,10 @@ func (r *RouteHandler) signalStatus(c *gin.Context) {
c.JSON(http.StatusOK, "ok")
}

func (r *RouteHandler) signalEmpty(c *gin.Context) {
c.JSON(http.StatusOK, "")
}

func (r *RouteHandler) versionHandler(c *gin.Context) {
c.JSON(http.StatusOK, r.buildInfo)
}
Expand Down

0 comments on commit 3e22182

Please sign in to comment.