mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
Add APIs for message broadcast (#9031)
* 🎨 Add API for broadcast * 🎨 Add API `/api/broadcast/getListenerCount` * 🎨 Add API GET `/api/broadcast/channels` * 🎨 Add API POST `/api/broadcast/getChannelInfo` * Update broadcast.go * Update broadcast.go
This commit is contained in:
parent
f1e875698a
commit
2f75010785
2 changed files with 231 additions and 0 deletions
|
|
@ -372,4 +372,9 @@ func ServeAPI(ginServer *gin.Engine) {
|
|||
ginServer.Handle("POST", "/api/petal/setPetalEnabled", model.CheckAuth, model.CheckReadonly, setPetalEnabled)
|
||||
|
||||
ginServer.Handle("POST", "/api/network/forwardProxy", model.CheckAuth, model.CheckReadonly, forwardProxy)
|
||||
|
||||
ginServer.Handle("GET", "/ws/broadcast", model.CheckAuth, broadcast)
|
||||
ginServer.Handle("GET", "/api/broadcast/channels", model.CheckAuth, getChannels)
|
||||
ginServer.Handle("POST", "/api/broadcast/postMessage", model.CheckAuth, postMessage)
|
||||
ginServer.Handle("POST", "/api/broadcast/getChannelInfo", model.CheckAuth, getChannelInfo)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue