From e1123576f3c95518146dc4cc2bd4da9ee933fc83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 7 Dec 2022 16:25:58 +0000 Subject: [PATCH] disable school events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- services/graph/pkg/service/v0/schools.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/services/graph/pkg/service/v0/schools.go b/services/graph/pkg/service/v0/schools.go index ee4a74b48b..b925981d35 100644 --- a/services/graph/pkg/service/v0/schools.go +++ b/services/graph/pkg/service/v0/schools.go @@ -13,8 +13,6 @@ import ( libregraph "github.com/owncloud/libre-graph-api-go" "github.com/owncloud/ocis/v2/services/graph/pkg/service/v0/errorcode" - ctxpkg "github.com/cs3org/reva/v2/pkg/ctx" - "github.com/cs3org/reva/v2/pkg/events" "github.com/go-chi/chi/v5" "github.com/go-chi/render" ) @@ -86,6 +84,7 @@ func (g Graph) PostSchool(w http.ResponseWriter, r *http.Request) { return } + /* TODO requires reva changes if school != nil && school.Id != nil { e := events.SchoolCreated{SchoolID: *school.Id} if currentUser, ok := ctxpkg.ContextGetUser(r.Context()); ok { @@ -93,6 +92,7 @@ func (g Graph) PostSchool(w http.ResponseWriter, r *http.Request) { } g.publishEvent(e) } + */ render.Status(r, http.StatusCreated) render.JSON(w, r, school) @@ -123,11 +123,13 @@ func (g Graph) PatchSchool(w http.ResponseWriter, r *http.Request) { return } + /* TODO requires reva changes e := events.SchoolFeatureChanged{SchoolID: schoolID} if currentUser, ok := ctxpkg.ContextGetUser(r.Context()); ok { e.Executant = currentUser.GetId() } g.publishEvent(e) + */ render.Status(r, http.StatusNoContent) render.NoContent(w, r) @@ -201,11 +203,13 @@ func (g Graph) DeleteSchool(w http.ResponseWriter, r *http.Request) { return } + /* TODO requires reva changes e := events.SchoolDeleted{SchoolID: schoolID} if currentUser, ok := ctxpkg.ContextGetUser(r.Context()); ok { e.Executant = currentUser.GetId() } g.publishEvent(e) + */ render.Status(r, http.StatusNoContent) render.NoContent(w, r) @@ -311,11 +315,13 @@ func (g Graph) PostSchoolMember(w http.ResponseWriter, r *http.Request) { return } + /* TODO requires reva changes e := events.SchoolMemberAdded{SchoolID: schoolID, UserID: id} if currentUser, ok := ctxpkg.ContextGetUser(r.Context()); ok { e.Executant = currentUser.GetId() } g.publishEvent(e) + */ render.Status(r, http.StatusNoContent) render.NoContent(w, r) @@ -367,11 +373,13 @@ func (g Graph) DeleteSchoolMember(w http.ResponseWriter, r *http.Request) { return } + /* TODO requires reva changes e := events.SchoolMemberRemoved{SchoolID: schoolID, UserID: memberID} if currentUser, ok := ctxpkg.ContextGetUser(r.Context()); ok { e.Executant = currentUser.GetId() } g.publishEvent(e) + */ render.Status(r, http.StatusNoContent) render.NoContent(w, r)