Commit c1454167 authored by Martin Matějek's avatar Martin Matějek

Don't expose notification instances through api

Return them as strings instead
parent e5d998de
......@@ -34,11 +34,6 @@ class Api:
self.delete_invalid_messages()
return self.notifications.get_all()
def get_notification(self, msgid):
"""Get single notification instance"""
self.delete_invalid_messages()
return self.notifications.get_notification(msgid)
def get_rendered_notification(self, msgid, media_type, lang):
"""Show notification of one specific by id"""
self.delete_invalid_messages()
......
......@@ -66,12 +66,12 @@ class NotificationStorage:
return self.rendered[(msgid, media_type, lang)]
def get_all(self):
return self.notifications
"""Get all notifications as strings"""
return {k: str(v) for k, v in self.notifications.items()}
# # TODO: WIP helper fce
# def render_one(self, notif):
# pass
# def render_all(self):
# """Render all notifications"""
# for n in self.notifications:
......
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