Make sure to return an empty JSON object ({}) from presence PUT/POST requests rather than an empty string ("") because most deserialisers won't like the latter

pull/9/head
Paul "LeoNerd" Evans 2014-10-14 16:47:08 +01:00
parent 9aed791fc3
commit 13b560971e
1 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ class PresenceStatusRestServlet(RestServlet):
yield self.handlers.presence_handler.set_state( yield self.handlers.presence_handler.set_state(
target_user=user, auth_user=auth_user, state=state) target_user=user, auth_user=auth_user, state=state)
defer.returnValue((200, "")) defer.returnValue((200, {}))
def on_OPTIONS(self, request): def on_OPTIONS(self, request):
return (200, {}) return (200, {})
@ -141,7 +141,7 @@ class PresenceListRestServlet(RestServlet):
yield defer.DeferredList(deferreds) yield defer.DeferredList(deferreds)
defer.returnValue((200, "")) defer.returnValue((200, {}))
def on_OPTIONS(self, request): def on_OPTIONS(self, request):
return (200, {}) return (200, {})