diff options
Diffstat (limited to 'service/pixelated/user_agent.py')
-rw-r--r-- | service/pixelated/user_agent.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/service/pixelated/user_agent.py b/service/pixelated/user_agent.py index d97d5905..04be0b90 100644 --- a/service/pixelated/user_agent.py +++ b/service/pixelated/user_agent.py @@ -166,6 +166,20 @@ def mark_mail_as_read(mail_id): return "" +@app.route('/mail/<mail_id>/unread', methods=['POST']) +def mark_mail_as_unread(mail_id): + mail_service.mark_as_unread(mail_id) + return "" + + +@app.route('/mails/unread', methods=['POST']) +def mark_many_mail_unread(): + idents = json.loads(request.form['idents']) + for ident in idents: + mail_service.mark_as_unread(ident) + return "" + + @app.route('/contacts') def contacts(): pass |