feat: 为通知接口添加CRUD
This commit is contained in:
@ -9,3 +9,15 @@ import (
|
||||
func GetNotifications(c *gin.Context) {
|
||||
response.NewResponse().WithData(onvif.Notifications).Send(c)
|
||||
}
|
||||
|
||||
func GetNotificationByXaddr(c *gin.Context) {
|
||||
xaddr := c.Param("xaddr")
|
||||
response.NewResponse().WithData(onvif.Notifications[xaddr]).Send(c)
|
||||
}
|
||||
|
||||
func DeleteNotificationByXaddr(c *gin.Context) {
|
||||
xaddr := c.Param("xaddr")
|
||||
delete(onvif.Notifications, xaddr)
|
||||
|
||||
response.NewResponse().Success().Send(c)
|
||||
}
|
||||
|
Reference in New Issue
Block a user