Update typing_route.py

This commit is contained in:
Liam 2022-06-10 00:30:59 -07:00 committed by GitHub
parent d399194b6c
commit a386300f38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,7 +25,7 @@ def hello_bytes() -> bytes:
def hello_json() -> Response:
return jsonify({"response": "Hello, World!"})
#Returns hello with the current status code when "/status" is accessed or "/status" is accessed with the parameter "code"
@app.route("/status")
@app.route("/status/<int:code>")
def tuple_status(code: int = 200) -> tuple[str, int]: