Set right mime type for presence graph

parent c4bc423c
......@@ -10,11 +10,11 @@
"""
HTTP requests handlers.
"""
import json
import time
from datetime import datetime, timedelta
import json
import markdown
import time
import tornado.auth
import tornado.websocket
from sqlalchemy import distinct
......@@ -439,8 +439,12 @@ class MACUpdateHandler(BaseHandler):
# Since this is an API call, we need to disable anti-XSRF protection
pass
class PresenceGraphHandler(BaseHandler):
PRESENCE = Presence()
def prepare(self):
self.set_header("Content-Type", "image/svg+xml")
def get(self):
self.write(PresenceGraphHandler.PRESENCE.get_graph().tostring())
\ No newline at end of file
self.write(PresenceGraphHandler.PRESENCE.get_graph().tostring())
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment