-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ccaa5bb
commit e500e68
Showing
7 changed files
with
35 additions
and
32 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from fastapi import APIRouter | ||
|
||
from src.auth.base_config import auth_backend, fastapi_users | ||
from src.auth.schemas import UserCreateInput, UserCreateOutput | ||
|
||
router = APIRouter( | ||
prefix="/auth", | ||
tags=["Auth"], | ||
) | ||
|
||
router.include_router(fastapi_users.get_auth_router(auth_backend),) | ||
router.include_router(fastapi_users.get_register_router( | ||
UserCreateInput, UserCreateOutput | ||
)) |
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
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,18 +1,14 @@ | ||
from fastapi import FastAPI | ||
from fastapi import APIRouter, FastAPI | ||
|
||
from src.auth.base_config import auth_backend, fastapi_users | ||
from src.auth.schemas import UserCreate, UserRead | ||
from src.auth.routers import router as auth_router | ||
|
||
app = FastAPI(title="social networking application", docs_url="/") | ||
|
||
app.include_router( | ||
fastapi_users.get_auth_router(auth_backend), | ||
prefix="/auth", | ||
tags=["Auth"], | ||
app = FastAPI( | ||
title="social networking application", | ||
docs_url="/", | ||
) | ||
|
||
app.include_router( | ||
fastapi_users.get_register_router(UserRead, UserCreate), | ||
prefix="/auth", | ||
tags=["Auth"], | ||
) | ||
main_router = APIRouter(prefix='/api/v1') | ||
main_router.include_router(auth_router) | ||
|
||
app.include_router(main_router) |