aboutsummaryrefslogtreecommitdiff
path: root/syncapi/routing/routing.go
diff options
context:
space:
mode:
Diffstat (limited to 'syncapi/routing/routing.go')
-rw-r--r--syncapi/routing/routing.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/syncapi/routing/routing.go b/syncapi/routing/routing.go
index 8f84a134..069dee81 100644
--- a/syncapi/routing/routing.go
+++ b/syncapi/routing/routing.go
@@ -60,6 +60,16 @@ func Setup(
return OnIncomingMessagesRequest(req, syncDB, vars["roomID"], device, rsAPI, cfg, srp, lazyLoadCache)
})).Methods(http.MethodGet, http.MethodOptions)
+ v3mux.Handle("/rooms/{roomID}/event/{eventID}",
+ httputil.MakeAuthAPI("rooms_get_event", userAPI, func(req *http.Request, device *userapi.Device) util.JSONResponse {
+ vars, err := httputil.URLDecodeMapValues(mux.Vars(req))
+ if err != nil {
+ return util.ErrorResponse(err)
+ }
+ return GetEvent(req, device, vars["roomID"], vars["eventID"], cfg, syncDB, rsAPI)
+ }),
+ ).Methods(http.MethodGet, http.MethodOptions)
+
v3mux.Handle("/user/{userId}/filter",
httputil.MakeAuthAPI("put_filter", userAPI, func(req *http.Request, device *userapi.Device) util.JSONResponse {
vars, err := httputil.URLDecodeMapValues(mux.Vars(req))