-
-
Save Sachin-Kottarathodi/2a6cccb29b4a9fdc7d58086af07aa6eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request | |
from fraud_checks import FraudChecks | |
from setup import Setup | |
app = Flask(__name__) | |
@app.route('/', methods=['POST']) | |
def check_fraud(): | |
try: | |
response = FraudChecks().check_fraud(request.get_json()) | |
code = 200 | |
except Exception as e: | |
print("Error occurred ", e) | |
response = str(e) | |
code = 500 | |
return response, code | |
if __name__ == '__main__': | |
Setup().init() | |
app.run(port=5000, debug=False, host='0.0.0.0') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment