mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
support DELETE /version with no args
This commit is contained in:
parent
edc427a351
commit
72788cf9c1
@ -267,7 +267,7 @@ class E2eRoomKeysHandler(object):
|
|||||||
defer.returnValue(results)
|
defer.returnValue(results)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def delete_version(self, user_id, version):
|
def delete_version(self, user_id, version=None):
|
||||||
"""Deletes a given version of the user's e2e_room_keys backup
|
"""Deletes a given version of the user's e2e_room_keys backup
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -308,7 +308,7 @@ class RoomKeysVersionServlet(RestServlet):
|
|||||||
It takes out an exclusive lock on this user's room_key backups, to ensure
|
It takes out an exclusive lock on this user's room_key backups, to ensure
|
||||||
clients only upload to the current backup.
|
clients only upload to the current backup.
|
||||||
|
|
||||||
Returns 404 is the given version does not exist.
|
Returns 404 if the given version does not exist.
|
||||||
|
|
||||||
GET /room_keys/version/12345 HTTP/1.1
|
GET /room_keys/version/12345 HTTP/1.1
|
||||||
{
|
{
|
||||||
@ -330,7 +330,8 @@ class RoomKeysVersionServlet(RestServlet):
|
|||||||
def on_DELETE(self, request, version):
|
def on_DELETE(self, request, version):
|
||||||
"""
|
"""
|
||||||
Delete the information about a given version of the user's
|
Delete the information about a given version of the user's
|
||||||
room_keys backup. Doesn't delete the actual room data.
|
room_keys backup. If the version part is missing, deletes the most
|
||||||
|
current backup version (if any). Doesn't delete the actual room data.
|
||||||
|
|
||||||
DELETE /room_keys/version/12345 HTTP/1.1
|
DELETE /room_keys/version/12345 HTTP/1.1
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
|
Loading…
Reference in New Issue
Block a user