summaryrefslogtreecommitdiff
path: root/service/pixelated
diff options
context:
space:
mode:
authorDuda Dornelles <ddornell@thoughtworks.com>2014-12-18 14:36:10 -0200
committerDuda Dornelles <ddornell@thoughtworks.com>2014-12-18 14:37:14 -0200
commit8e57412dcd7fe8749ebed645e048309618ed01b5 (patch)
treed736ae52d3fbffee06e482b19702c78041c83f71 /service/pixelated
parent2d07349df9eb7fd3a197c0c3a9f7180af441f82c (diff)
\#203 & #204 & #205: fixing client and api for buld mark as read/unread and delete, functional tests are still broken, investigating...
Diffstat (limited to 'service/pixelated')
-rw-r--r--service/pixelated/config/routes.py4
-rw-r--r--service/pixelated/controllers/mails_controller.py10
2 files changed, 1 insertions, 13 deletions
diff --git a/service/pixelated/config/routes.py b/service/pixelated/config/routes.py
index 334119fc..5efbbb28 100644
--- a/service/pixelated/config/routes.py
+++ b/service/pixelated/config/routes.py
@@ -2,13 +2,11 @@ def setup_routes(app, home_controller, mails_controller, tags_controller, featur
attachments_controller, contacts_controller):
# mails
app.route('/mails', methods=['GET'])(mails_controller.mails)
- app.route('/mail/<mail_id>/read', methods=['POST'])(mails_controller.mark_mail_as_read)
- app.route('/mail/<mail_id>/unread', methods=['POST'])(mails_controller.mark_mail_as_unread)
app.route('/mails/unread', methods=['POST'])(mails_controller.mark_many_mail_unread)
app.route('/mails/read', methods=['POST'])(mails_controller.mark_many_mail_read)
app.route('/mail/<mail_id>', methods=['GET'])(mails_controller.mail)
app.route('/mail/<mail_id>', methods=['DELETE'])(mails_controller.delete_mail)
- app.route('/mails', methods=['DELETE'])(mails_controller.delete_mails)
+ app.route('/mails/delete', methods=['POST'])(mails_controller.delete_mails)
app.route('/mails', methods=['POST'])(mails_controller.send_mail)
app.route('/mail/<mail_id>/tags', methods=['POST'])(mails_controller.mail_tags)
app.route('/mails', methods=['PUT'])(mails_controller.update_draft)
diff --git a/service/pixelated/controllers/mails_controller.py b/service/pixelated/controllers/mails_controller.py
index 7166a51d..eba97784 100644
--- a/service/pixelated/controllers/mails_controller.py
+++ b/service/pixelated/controllers/mails_controller.py
@@ -44,16 +44,6 @@ class MailsController:
mail = self._mail_service.mail(mail_id)
return respond_json(mail.as_dict(), request)
- def mark_mail_as_read(self, request, mail_id):
- mail = self._mail_service.mark_as_read(mail_id)
- self._search_engine.index_mail(mail)
- return ""
-
- def mark_mail_as_unread(self, request, mail_id):
- mail = self._mail_service.mark_as_unread(mail_id)
- self._search_engine.index_mail(mail)
- return ""
-
def mark_many_mail_unread(self, request):
content_dict = json.load(request.content)
idents = content_dict.get('idents')