Skip to content

Commit

Permalink
Added a temporary /ocm/notifications endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Jun 16, 2023
1 parent 223c43c commit cdd48e3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/http/services/ocmd/ocm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

Expand Down

0 comments on commit cdd48e3

Please sign in to comment.