mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🧑💻 Add Kernel API for subscribe broadcast message by SSE (#13694)
* 🎨 Add Kernel API for subscribe broadcast * 🐛 Fix request serialization * 🐛 Fix broadcast message loss issue * 🎨 Add event ID * 🎨 Add retry field * 🐛 Fix event ID format
This commit is contained in:
parent
20694a374c
commit
69c9539cdc
4 changed files with 548 additions and 110 deletions
|
|
@ -459,6 +459,8 @@ func ServeAPI(ginServer *gin.Engine) {
|
|||
ginServer.Handle("POST", "/api/network/forwardProxy", model.CheckAuth, model.CheckAdminRole, forwardProxy)
|
||||
|
||||
ginServer.Handle("GET", "/ws/broadcast", model.CheckAuth, model.CheckAdminRole, broadcast)
|
||||
ginServer.Handle("GET", "/es/broadcast/subscribe", model.CheckAuth, model.CheckAdminRole, broadcastSubscribe)
|
||||
|
||||
ginServer.Handle("POST", "/api/broadcast/publish", model.CheckAuth, model.CheckAdminRole, broadcastPublish)
|
||||
ginServer.Handle("POST", "/api/broadcast/postMessage", model.CheckAuth, model.CheckAdminRole, postMessage)
|
||||
ginServer.Handle("POST", "/api/broadcast/getChannels", model.CheckAuth, model.CheckAdminRole, getChannels)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue