feat: support push notification clients

This commit is contained in:
Simon Ding
2024-07-29 15:56:29 +08:00
parent f9d4f851eb
commit fcff47041a
30 changed files with 3004 additions and 90 deletions

View File

@@ -115,6 +115,13 @@ func (s *Server) Serve() error {
storage.POST("/", HttpHandler(s.AddStorage))
storage.DELETE("/:id", HttpHandler(s.DeleteStorage))
}
notifier := api.Group("/notifier")
{
notifier.GET("/all", HttpHandler(s.GetAllNotificationClients))
notifier.GET("/id/:id", HttpHandler(s.GetNotificationClient))
notifier.DELETE("/id/:id", HttpHandler(s.DeleteNotificationClient))
notifier.POST("/add", HttpHandler(s.AddNotificationClient))
}
s.language = s.db.GetLanguage()
return s.r.Run(":8080")