This commit is contained in:
parent
cb14b8283e
commit
ceee8ec6b4
4 changed files with 6 additions and 6 deletions
|
@ -13,7 +13,7 @@ func newHealthHandler() *healthHandler {
|
|||
return &healthHandler{}
|
||||
}
|
||||
|
||||
func (h *healthHandler) showHealth(c *gin.Context) {
|
||||
func (h *healthHandler) show(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, api.DataResponse{Data: gin.H{
|
||||
"healthy": true,
|
||||
}})
|
||||
|
|
|
@ -14,7 +14,7 @@ func newInfoHandler(a *appConfig) *infoHandler {
|
|||
return &infoHandler{appConfig: *a}
|
||||
}
|
||||
|
||||
func (h *infoHandler) showInfo(c *gin.Context) {
|
||||
func (h *infoHandler) show(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, api.DataResponse{Data: gin.H{
|
||||
"name": Name,
|
||||
"version": Version,
|
||||
|
|
|
@ -16,7 +16,7 @@ func newWebhookInvocationHandler(i *webhookInvocationService, w *webhookService)
|
|||
return &webhookInvocationHandler{invocationService: *i, webhookService: *w}
|
||||
}
|
||||
|
||||
func (h *webhookInvocationHandler) executeWebhookGeneric(c *gin.Context) {
|
||||
func (h *webhookInvocationHandler) execute(c *gin.Context) {
|
||||
tokenHeader := c.GetHeader(HeaderWebhookToken)
|
||||
webhookId := c.Param("id")
|
||||
|
||||
|
|
|
@ -79,10 +79,10 @@ func Start() {
|
|||
}))
|
||||
|
||||
apiPublicGroup := router.Group("/api/v1")
|
||||
apiPublicGroup.GET("/health", healthHandler.showHealth)
|
||||
apiPublicGroup.GET("/info", infoHandler.showInfo)
|
||||
apiPublicGroup.GET("/health", healthHandler.show)
|
||||
apiPublicGroup.GET("/info", infoHandler.show)
|
||||
|
||||
apiPublicGroup.POST("/webhooks/:id", webhookInvocationHandler.executeWebhookGeneric)
|
||||
apiPublicGroup.POST("/webhooks/:id", webhookInvocationHandler.execute)
|
||||
|
||||
apiAuthGroup := router.Group("/api/v1", gin.BasicAuth(gin.Accounts{
|
||||
env.authConfig.adminUser: env.authConfig.adminPassword,
|
||||
|
|
Loading…
Reference in a new issue