aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jb/views/auth.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/jb/views/auth.py b/jb/views/auth.py
index ce9c1e0..f1c2081 100644
--- a/jb/views/auth.py
+++ b/jb/views/auth.py
@@ -35,7 +35,7 @@ from jb.settings import BASE_HTML
auth_router = APIRouter(prefix="/auth", tags=["Auth"])
-@auth_router.post("/magic-link/request")
+@auth_router.post("/magic-link/request/")
def request_magic_link(body: AccountLogin) -> dict[str, str]:
"""Create a magic link."""
email = str(body.email)
@@ -74,7 +74,7 @@ def magic_link_landing_page(
)
-@auth_router.post("/magic-link/exchange", status_code=status.HTTP_204_NO_CONTENT)
+@auth_router.post("/magic-link/exchange/", status_code=status.HTTP_204_NO_CONTENT)
def exchange_magic_link(
body: MagicLinkExchangeRequest,
response: Response,
@@ -98,7 +98,7 @@ def _exchange_magic_link(token: str, response: Response, gr_api: GRApiManager) -
)
-@auth_router.post("/link-amt/request")
+@auth_router.post("/link-amt/request/")
def link_amt_account(body: AmtAccountLink) -> dict[str, str]:
"""Link an AMT account and login."""
email = str(body.email)
@@ -149,7 +149,7 @@ def link_amt_account_landing_page(
)
-@auth_router.post("/link-amt/exchange", status_code=status.HTTP_204_NO_CONTENT)
+@auth_router.post("/link-amt/exchange/", status_code=status.HTTP_204_NO_CONTENT)
def exchange_amt_account_link(
body: MagicLinkExchangeRequest,
response: Response,
@@ -186,14 +186,14 @@ def _exchange_amt_account_link(token: str, response: Response, gr_api: GRApiMana
)
-@auth_router.get("/session", response_model=User)
+@auth_router.get("/session/", response_model=User)
def get_session(
user: Annotated[User, Depends(get_authenticated_user)],
) -> User:
return user
-@auth_router.delete("/session", status_code=status.HTTP_204_NO_CONTENT)
+@auth_router.delete("/session/", status_code=status.HTTP_204_NO_CONTENT)
def delete_session(
response: Response,
) -> None: