File size: 424 Bytes
56266ec
 
22ad7f3
 
 
 
 
9a5dd56
 
4de9537
 
 
 
bf59c35
9a5dd56
56266ec
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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