diff options
author | Erik Johnston <erik@matrix.org> | 2016-05-04 13:19:39 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-05-04 13:19:39 +0100 |
commit | 5650e38e7de4cf89074ff84f4ecfbfcd81fa810d (patch) | |
tree | 6710733ced7db281984a8f3a42e5a8cfd8a0eba3 /synapse/rest | |
parent | Add /report endpoint (diff) | |
download | synapse-5650e38e7de4cf89074ff84f4ecfbfcd81fa810d.tar.xz |
Move event_id to path
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/client/v2_alpha/report_event.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/rest/client/v2_alpha/report_event.py b/synapse/rest/client/v2_alpha/report_event.py index 412e5b1903..9c1c9662c9 100644 --- a/synapse/rest/client/v2_alpha/report_event.py +++ b/synapse/rest/client/v2_alpha/report_event.py @@ -26,7 +26,7 @@ logger = logging.getLogger(__name__) class ReportEventRestServlet(RestServlet): PATTERNS = client_v2_patterns( - "/rooms/(?P<room_id>[^/]*)/report$" + "/rooms/(?P<room_id>[^/]*)/report/(?P<event_id>[^/]*)$" ) def __init__(self, hs): @@ -36,14 +36,12 @@ class ReportEventRestServlet(RestServlet): self.store = hs.get_datastore() @defer.inlineCallbacks - def on_POST(self, request, room_id): + def on_POST(self, request, room_id, event_id): requester = yield self.auth.get_user_by_req(request) user_id = requester.user.to_string() body = parse_json_object_from_request(request) - event_id = body["event_id"] - yield self.store.add_event_report( room_id=room_id, event_id=event_id, |