Skip to content

Commit

Permalink
fix: change get_user route to GET
Browse files Browse the repository at this point in the history
  • Loading branch information
samderanova committed Dec 12, 2023
1 parent 08da534 commit 25c0454
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/api/src/routers/demo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Annotated, Union, Any
from typing import Annotated, Union

from fastapi import APIRouter, Cookie, Form

Expand All @@ -19,8 +19,8 @@ async def square(value: Annotated[int, Form()]) -> int:
return value * value


@router.post("/user")
async def get_user(search_name: Annotated[str, Form()]) -> list[dict[str, object]]:
@router.get("/user")
async def get_user(search_name: str) -> list[dict[str, object]]:
results = await retrieve(
Collection.USERS, {"name": search_name}, ["name", "ucinetid"]
)
Expand Down

0 comments on commit 25c0454

Please sign in to comment.