mirror of
https://git.vectorsigma.ru/public/CasaOS.git
synced 2026-08-06 02:17:48 +00:00
add system notiry
This commit is contained in:
@@ -244,6 +244,8 @@ func InitRouter() *gin.Engine {
|
||||
v1NotifyGroup.Use()
|
||||
{
|
||||
v1NotifyGroup.POST("/:path", v1.PostNotifyMssage)
|
||||
//merge to system
|
||||
v1NotifyGroup.POST("", v1.PostSystemNotyfiy)
|
||||
}
|
||||
}
|
||||
return r
|
||||
|
||||
@@ -14,3 +14,9 @@ func PostNotifyMssage(c *gin.Context) {
|
||||
service.MyService.Notify().SendNotify(path, message)
|
||||
c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS)})
|
||||
}
|
||||
func PostSystemNotyfiy(c *gin.Context) {
|
||||
message := make(map[string]interface{})
|
||||
c.ShouldBind(&message)
|
||||
service.MyService.Notify().SettingSystemTempData(message)
|
||||
c.JSON(common_err.SUCCESS, model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS)})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user