Return empty object on success rather than null.

Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
This commit is contained in:
Olivier Wilkinson (reivilibre) 2019-08-20 10:29:36 +01:00
parent 0e99412f4c
commit 6e827507f7

View file

@ -69,8 +69,8 @@ class UserAdminServlet(RestServlet):
if target_user == auth_user and not set_admin_to: if target_user == auth_user and not set_admin_to:
raise SynapseError(400, "You may not demote yourself.") raise SynapseError(400, "You may not demote yourself.")
ret = yield self.handlers.admin_handler.set_user_server_admin( yield self.handlers.admin_handler.set_user_server_admin(
target_user, set_admin_to target_user, set_admin_to
) )
return (200, ret) return (200, {})