summaryrefslogtreecommitdiff
path: root/service/app/pixelated_user_agent.py
diff options
context:
space:
mode:
authorBruno Wagner Goncalves <bwagner@thoughtworks.com>2014-08-07 16:27:52 -0300
committerBruno Wagner Goncalves <bwagner@thoughtworks.com>2014-08-07 16:37:27 -0300
commitd4cf82682a1cc586628922f18fd0f501772717eb (patch)
tree7226db9e41e7e51cb945fe17c89acf877b10498d /service/app/pixelated_user_agent.py
parent719240d19bfcf5488a99d38cacccdbbeb94e30f8 (diff)
Search shouldn't be a module yet, because it only have one file
Diffstat (limited to 'service/app/pixelated_user_agent.py')
-rw-r--r--service/app/pixelated_user_agent.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/service/app/pixelated_user_agent.py b/service/app/pixelated_user_agent.py
index a7fb9991..c28615ed 100644
--- a/service/app/pixelated_user_agent.py
+++ b/service/app/pixelated_user_agent.py
@@ -3,7 +3,7 @@ import datetime
import requests
from flask import Flask, request, Response
-from app.search import SearchQuery
+import app.search_query as search_query
from app.adapter.mail_service import MailService
from app.adapter.mail_converter import MailConverter
@@ -41,7 +41,7 @@ def update_draft():
@app.route('/mails')
def mails():
- query = SearchQuery.compile(request.args.get("q")) if request.args.get("q") else {'tags': {}}
+ query = search_query.compile(request.args.get("q")) if request.args.get("q") else {'tags': {}}
mails = mail_service.drafts() if "drafts" in query['tags'] else mail_service.mails(query)
mails = [converter.from_mail(mail) for mail in mails]
@@ -95,7 +95,7 @@ def mark_mail_as_read(mail_id):
@app.route('/contacts')
def contacts():
- query = SearchQuery.compile(request.args.get("q"))
+ query = search_query.compile(request.args.get("q"))
desired_contacts = [converter.from_contact(contact) for contact in client.all_contacts(query)]
return respond_json({'contacts': desired_contacts})