Skip to content

Commit

Permalink
pipenv ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
markroxor committed Jan 6, 2019
1 parent ff0cead commit f81d816
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@ env

# cache
__pycache__
/*/.pyc
/*/.pyc../.gitignore

# pipenv
Pipfile
Pipfile.lock
client/Pipfile
client/Pipfile.lock
9 changes: 6 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def process_df_api():

default_POST_response = "GOT a DF API POST request."
json_request = request.get_json()
print(json_request)

if json_request['queryResult']['action'] == 'input.unknown':
database_do(action='unresponsed_query', query=json_request['queryResult']['queryText'])
Expand Down Expand Up @@ -128,10 +129,12 @@ def process_df_api():

print("Sending query {} with params {} and action {} to {}".format(url, query, parameters, action))
requests.post(url=url, data=json.dumps(json_request), headers=headers)

print('Successfully handled request.')
return return_text('success'), 200

print ('Default POST RESPONSE')
return return_text(default_POST_response), 200

return default_POST_response, 200


@app.route("/config", methods=["POST"])
def process_config():
Expand Down

0 comments on commit f81d816

Please sign in to comment.