-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lu Ken <[email protected]>
- Loading branch information
1 parent
0c20703
commit afe61a0
Showing
8 changed files
with
40 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
9 changes: 7 additions & 2 deletions
9
src/gentrade-server/routers/public.py → src/gentrade_server/routers/public.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
""" | ||
Public result API interfaces | ||
""" | ||
from fastapi import APIRouter | ||
|
||
|
||
router = APIRouter() | ||
|
||
@router.get("/") | ||
async def get_testroute(): | ||
return "OK" | ||
""" | ||
Test public interface | ||
""" | ||
return "OK" |
8 changes: 7 additions & 1 deletion
8
src/gentrade-server/routers/secure.py → src/gentrade_server/routers/secure.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
""" | ||
Secure API interface | ||
""" | ||
from fastapi import APIRouter, Depends | ||
from ..auth import get_user | ||
|
||
router = APIRouter() | ||
|
||
@router.get("/") | ||
async def get_testroute(user: dict = Depends(get_user)): | ||
return user | ||
""" | ||
Test secure interface | ||
""" | ||
return user |