File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -10,4 +10,4 @@ async def get_token_header(x_token: str = Header(...)):
1010 raise HTTPException (status_code = 400 , detail = "X-Token header invalid" )
1111
1212
13- app .include_router (hugs .router )
13+ app .include_router (hugs .router )
Original file line number Diff line number Diff line change 11from fastapi import APIRouter
2- from data import models
2+ from app . data import models
33
44router = APIRouter ()
55
66
77@router .get ("/hugs/" , tags = ["Friendly_Hugs" ])
88async def read_hugs ():
9- """
9+ '''
1010 Returns all huggers available
11- """
11+ '''
1212 return [{"hugs" : "Pooh" }, {"username" : "Bear" }]
1313
1414
1515@router .get ("/hugs/me" , tags = ["Friendly_Hugs" ])
1616async def read_huggee_me ():
17- """
17+ '''
1818 Set to return user context. In this case the hugee.
19- """
19+ '''
2020 return {"username" : "Huggable Developer" }
2121
2222
2323@router .get ("/hugs/{type}" , tags = ["Friendly_Hugs" ])
2424async def read_hug_type (hug_type : str ):
25- """
25+ '''
2626 Allows user to enter the type of hug they want.
2727 Replace with any single non-enum type.
28- """
29- return {"username" : hug_type }
28+ '''
29+ return {"username" : hug_type }
You can’t perform that action at this time.
0 commit comments