Skip to content

Commit

Permalink
signal to clients the route was removed with woodpecker-ci#2639
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Nov 15, 2023
1 parent 342b258 commit 81a60eb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions server/router/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
package router

import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/rs/zerolog"

Expand Down Expand Up @@ -224,4 +226,12 @@ func apiRoutes(e *gin.RouterGroup) {
}
}
}

// TODO: remove with 3.x
e.Any("/hook", func(c *gin.Context) {
c.String(http.StatusGone, "use /api/hook")
})
e.Any("/stream/events", func(c *gin.Context) {
c.String(http.StatusGone, "use /api/stream/events")
})
}

0 comments on commit 81a60eb

Please sign in to comment.