diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2014-11-20 13:43:12 -0200 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2014-11-24 08:21:59 -0200 |
commit | 4f484e4dd2a40c4b3c71cd3d241785fb3a7b2eaf (patch) | |
tree | 09d494d82ac812e87e45c1b1ccc6ff2693b49a62 /service/pixelated/config/routes.py | |
parent | d4b29e22f51c986e4b8306f1782ef3603248d0d5 (diff) |
Adding contacts controller and basic contact search
Diffstat (limited to 'service/pixelated/config/routes.py')
-rw-r--r-- | service/pixelated/config/routes.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/service/pixelated/config/routes.py b/service/pixelated/config/routes.py new file mode 100644 index 00000000..6bad8a17 --- /dev/null +++ b/service/pixelated/config/routes.py @@ -0,0 +1,26 @@ +def setup_routes(app, home_controller, mails_controller, tags_controller, features_controller, sync_info_controller, + 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', 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) + # tags + app.route('/tags', methods=['GET'])(tags_controller.tags) + # contacts + app.route('/contacts', methods=['GET'])(contacts_controller.contacts) + # features + app.route('/features', methods=['GET'])(features_controller.features) + # sync info + app.route('/sync_info', methods=['GET'])(sync_info_controller.sync_info) + # attachments + app.route('/attachment/<attachment_id>', methods=['GET'])(attachments_controller.attachment) + # static + app.route('/', methods=['GET'], branch=True)(home_controller.home)
\ No newline at end of file |