1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-24 08:02:18 +02:00

Signal to clients the hook and event routes where removed (#2826)

Signal to clients the hook and event routes where removed at #2639

close #2824
This commit is contained in:
6543 2023-11-19 20:32:35 +01:00 committed by GitHub
parent 83d0b0a7c2
commit 8a3a2303a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,8 @@
package router
import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/rs/zerolog"
@ -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")
})
}