From dc67415cf74f936ce66c3c27b2c290749b08a8b9 Mon Sep 17 00:00:00 2001 From: Ben Zhang Date: Sun, 18 Aug 2024 14:25:56 -0700 Subject: [PATCH] Use hyphen instead of underscore in api (#4) It's good practice to use hyphens instead of underscores in URLs: https://stackoverflow.com/a/2318376/4527337 --- src/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 159fb3f..35b8e2b 100644 --- a/src/main.py +++ b/src/main.py @@ -74,7 +74,7 @@ class SignUpRequest(BaseModel): CODE_TTL_SEC = 15 * 60 -@app.post("/sign_up") +@app.post("/sign-up") def sign_up(req: SignUpRequest, request: Request): # validate email if not re.match(r"[^@]+@[^@]+\.[^@]+", req.email):