Skip to content

Commit

Permalink
style(main.py): Refactoring'. fix #397 @0.75h
Browse files Browse the repository at this point in the history
  • Loading branch information
みぞ@CrazyBeatCoder committed Jul 21, 2018
1 parent 3f68482 commit 57ba490
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.py
Expand Up @@ -20,6 +20,8 @@
import logging
import webapp2

GOOGLE_ASSISTANT_WELCOME_INTENT = u'Google Assistant Welcome Intent'


class MainPage(webapp2.RequestHandler):
def get(self):
Expand All @@ -38,12 +40,12 @@ def post(self):
intentDisplayName = queryResult['intent']['displayName']

self.response.headers['Content-Type'] = 'application/json'
if intentDisplayName == u'Google Assistant Welcome Intent':
if intentDisplayName == GOOGLE_ASSISTANT_WELCOME_INTENT:
obj = {
u'fulfillmentText': queryResult['queryText'],
u'followupEventInput': {
u'name': u'ASK_CONTINUE_EVENT',
u'languageCode': u'ja',
u'languageCode': queryResult['languageCode'],
}
}
else:
Expand Down

0 comments on commit 57ba490

Please sign in to comment.