toxic / main.py
HMPhuoc's picture
add toxic file
56266ec
raw
history blame
424 Bytes
from flask import Flask, request
from app import judge
app = Flask(__name__)
@app.route("/")
def hello():
return {"hello":"Deploy success"}
@app.route("/test")
def test():
return "Test success"
@app.route("/test/<text>")
def returnText(text):
return f'The text is {text}'
@app.route("/check", methods=["POST"])
def check():
comment = request.json['comment']
result = judge(comment)
return result