1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-30 10:11:23 +02:00

temp workaround to get Drone correctly stream SSE events

This commit is contained in:
Brad Rydzewski 2015-05-16 20:08:32 -07:00
parent 27aadca029
commit b3951043a0

View File

@ -2,6 +2,7 @@ package server
import (
"bufio"
"encoding/json"
"io"
"net/http"
"strconv"
@ -54,7 +55,9 @@ func GetRepoEvents(c *gin.Context) {
}
if event.Kind == eventbus.EventRepo &&
event.Name == repo.FullName {
c.SSEvent("message", event.Msg)
d := map[string]interface{}{}
json.Unmarshal(event.Msg, &d)
c.SSEvent("message", d)
}
return true