summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorBruno Wagner Goncalves <bwagner@thoughtworks.com>2014-08-07 15:41:55 -0300
committerBruno Wagner Goncalves <bwagner@thoughtworks.com>2014-08-07 15:41:55 -0300
commit579dafc737ef4a3af98cede0af72bb492ca8a944 (patch)
tree3ebd88f4e8ea22833ca163ec91dc14d19c15065a /service
parente92847eae88a13cf9c6f407112c2a42b7c46e808 (diff)
Adapted run after module changes and changed mail service to return the mailbox messages
Diffstat (limited to 'service')
-rw-r--r--service/app/adapter/mail_service.py3
-rw-r--r--service/app/pixelated_user_agent.py15
2 files changed, 8 insertions, 10 deletions
diff --git a/service/app/adapter/mail_service.py b/service/app/adapter/mail_service.py
index b9ea238f..c2ba5e5e 100644
--- a/service/app/adapter/mail_service.py
+++ b/service/app/adapter/mail_service.py
@@ -28,8 +28,7 @@ class MailService:
self.mail_box = self.leap_session.account.getMailbox(self.mailbox_name)
def mails(self, query):
- self.mail_box.messages
- return []
+ return self.mail_box.messages
def drafts(self):
diff --git a/service/app/pixelated_user_agent.py b/service/app/pixelated_user_agent.py
index fb71a6f5..a7fb9991 100644
--- a/service/app/pixelated_user_agent.py
+++ b/service/app/pixelated_user_agent.py
@@ -3,13 +3,14 @@ import datetime
import requests
from flask import Flask, request, Response
-from search import SearchQuery
-from adapter.mail_service import MailService
-from adapter.mail_converter import MailConverter
+from app.search import SearchQuery
+from app.adapter.mail_service import MailService
+from app.adapter.mail_converter import MailConverter
app = Flask(__name__, static_url_path='', static_folder='../../web-ui/app')
-client = None
-converter = None
+
+mail_service = MailService()
+converter = MailConverter(mail_service)
account = None
@@ -112,12 +113,10 @@ def draft_reply_for(mail_id):
def index():
return app.send_static_file('index.html')
+
def setup():
app.config.from_envvar('PIXELATED_UA_CFG')
account = app.config['ACCOUNT']
-
- mail_service = MailService()
- converter = MailConverter(mail_service)
app.run(host=app.config['HOST'], debug=app.config['DEBUG'], port=app.config['PORT'])
if __name__ == '__main__':