Skip to content

Commit

Permalink
Signal to clients the hook and event routes where removed (#2826)
Browse files Browse the repository at this point in the history
Signal to clients the hook and event routes where removed at #2639

close #2824
  • Loading branch information
6543 authored Nov 19, 2023
1 parent 83d0b0a commit 8a3a230
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 8a3a230

Please sign in to comment.