diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-08-26 14:13:32 +0100 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-08-26 14:13:32 +0100 |
commit | 732d954f89bb48e885072b9a50cf01c2cdd3e2cd (patch) | |
tree | 8790c53bc68d605fb44f0d4e1637489123185a50 /synapse/rest/room.py | |
parent | Added servlet for /rooms/$roomid/[invite|join|leave] (diff) | |
download | synapse-732d954f89bb48e885072b9a50cf01c2cdd3e2cd.tar.xz |
Added basic in-memory REST transaction storage. Only the latest transaction for a given path/access_token combo is stored in order to prevent storing ALL request/response pairs.
Diffstat (limited to 'synapse/rest/room.py')
-rw-r--r-- | synapse/rest/room.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/rest/room.py b/synapse/rest/room.py index 118208ddcf..4ca7e7e785 100644 --- a/synapse/rest/room.py +++ b/synapse/rest/room.py @@ -375,10 +375,16 @@ class RoomMembershipRestServlet(RestServlet): register_txn_path(self, PATTERN, http_server) def on_POST(self, request, room_id, membership_action): - return (200, "Not implemented") + return (200, "POST Not implemented") def on_PUT(self, request, room_id, membership_action, txn_id): - return (200, "Not implemented") + (code, response) = self.txns.get_client_transaction(request, txn_id) + if code: + return (code, response) + + response = (200, "PUT not implemented txnid %s" % txn_id) + self.txns.store_client_transaction(request, txn_id, response) + return response def _parse_json(request): |