fix labels SSE paths
This commit is contained in:
parent
28b9492cb3
commit
65e5cf97fc
2 changed files with 2 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ async function sync() {
|
||||||
|
|
||||||
let eventSource;
|
let eventSource;
|
||||||
try {
|
try {
|
||||||
eventSource = new EventSource("/twitch/sse/" + label);
|
eventSource = new EventSource("/twitch/sse/labels/" + label);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Failed to connect to event source", err);
|
console.error("Failed to connect to event source", err);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,7 @@ func (srv *Service) BindRoutes(group *gin.RouterGroup) {
|
||||||
go srv.start(ctx)
|
go srv.start(ctx)
|
||||||
})
|
})
|
||||||
|
|
||||||
group.GET("/sse/label/:label", func(ctx *gin.Context) {
|
group.GET("/sse/labels/:label", func(ctx *gin.Context) {
|
||||||
ctx.Header("connection", "keep-alive")
|
ctx.Header("connection", "keep-alive")
|
||||||
|
|
||||||
labelParam := ctx.Param("label")
|
labelParam := ctx.Param("label")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue