Minor method renaming

This commit is contained in:
Varakh 2024-01-25 00:08:26 +01:00
parent 5acc136fe8
commit 99c63fdb8d
4 changed files with 6 additions and 6 deletions

View file

@ -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,
}})

View file

@ -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,

View file

@ -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")

View file

@ -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,