feat:#97 added post response and remove notification if event start in past

This commit is contained in:
masterElmar
2023-12-05 11:11:34 +01:00
parent fbaff30f09
commit b25c7a770d
2 changed files with 21 additions and 1 deletions

View File

@@ -194,6 +194,24 @@ func AddRoutes(app *pocketbase.PocketBase) {
return nil
})
app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
_, err := e.Router.AddRoute(echo.Route{
Method: http.MethodPut,
Path: "/api/feed",
Handler: func(c echo.Context) error {
token := c.QueryParam("token")
return c.JSON(http.StatusOK, "token: "+token)
},
Middlewares: []echo.MiddlewareFunc{
apis.ActivityLogger(app),
},
})
if err != nil {
return err
}
return nil
})
app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
_, err := e.Router.AddRoute(echo.Route{
Method: http.MethodGet,