2 changed files with 17 additions and 15 deletions
@ -1,13 +0,0 @@ |
|||||
from fastapi import FastAPI |
|
||||
|
|
||||
app = FastAPI() |
|
||||
|
|
||||
|
|
||||
@app.get("/users/{user_id}") |
|
||||
async def read_user(user_id: str): |
|
||||
return {"user_id": user_id} |
|
||||
|
|
||||
|
|
||||
@app.get("/users/me") |
|
||||
async def read_user_me(): |
|
||||
return {"user_id": "the current user"} |
|
Loading…
Reference in new issue