Skip to content

Commit

Permalink
fix: update3
Browse files Browse the repository at this point in the history
Signed-off-by: Gosha <[email protected]>
  • Loading branch information
gosharo committed Jul 11, 2023
1 parent cd9998c commit 166efd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/server/routes/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func AddWebhookRoutes(cfg *conf.GlobalConfig, clients *clients.Clients, rg *gin.RouterGroup) {
webhook := rg.Group("/webhook")

webhook.POST("", func(c *gin.Context) {
ctx := c.Copy().Request.Context()
webhookPayload, err := clients.GitProvider.HandlePayload(c.Request, []byte(cfg.GitProviderConfig.WebhookSecret))
Expand Down Expand Up @@ -45,7 +45,7 @@ func AddWebhookRoutes(cfg *conf.GlobalConfig, clients *clients.Clients, rg *gin.
err = clients.Workflows.HandleWorkflowBatch(&ctx, wf)
if err != nil {
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
log.Printf("failed to handle workflow, error: %v", err)
log.Printf("failed to handle workflow, error: %v", err) //Muli
return
}
}
Expand Down

0 comments on commit 166efd9

Please sign in to comment.