From cdd48e3fc8b2cbd40435a63e1308a7b2d4ffcb10 Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Fri, 16 Jun 2023 18:51:14 +0200 Subject: [PATCH] Added a temporary /ocm/notifications endpoint --- internal/http/services/ocmd/ocm.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/http/services/ocmd/ocm.go b/internal/http/services/ocmd/ocm.go index 6f997baf708..bb380d53ae1 100644 --- a/internal/http/services/ocmd/ocm.go +++ b/internal/http/services/ocmd/ocm.go @@ -73,9 +73,16 @@ func New(m map[string]interface{}, log *zerolog.Logger) (global.Service, error) return s, nil } +func (s *svc) Notifications(w http.ResponseWriter, r *http.Request) { + // TODO(lopresti) hack to test Nextcloud + w.WriteHeader(http.StatusCreated) +} + func (s *svc) routerInit() error { sharesHandler := new(sharesHandler) invitesHandler := new(invitesHandler) + // TODO(lopresti) implement a notifications handler + // notifHandler := new(notifHandler) if err := sharesHandler.init(s.Conf); err != nil { return err @@ -86,6 +93,7 @@ func (s *svc) routerInit() error { s.router.Post("/shares", sharesHandler.CreateShare) s.router.Post("/invite-accepted", invitesHandler.AcceptInvite) + s.router.Post("/notifications", s.Notifications) // notifHandler.Notifications) return nil }