Skip to content

Commit

Permalink
revise it v1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Guanghong Zheng committed Nov 11, 2024
1 parent 16eaa02 commit a293c9d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ def hello_world():
return render_template("index.html")


@app.route("/query", methods=["GET"])
def query():
query = request.args.get("q")
def process_query(query):
if query == "dinosaurs":
return "Dinosaurs ruled the Earth 200 million years ago"
else:
return "Unknown"

@app.route("/query", methods=["GET"])
def query():
query = request.args.get("q")
return process_query(query)


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

0 comments on commit a293c9d

Please sign in to comment.