This repository has been archived by the owner on Jun 24, 2024. It is now read-only.
-
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.
Showing
7 changed files
with
69 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
|
||
Base = declarative_base() | ||
|
||
|
||
def get_db(): | ||
db = SessionLocal() | ||
try: | ||
|
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
Empty file.
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,33 @@ | ||
from datetime import timedelta, datetime | ||
|
||
from fastapi import APIRouter, Depends, HTTPException | ||
from fastapi.security import OAuth2PasswordRequestForm, OAuth2PasswordBearer | ||
from jose import jwt | ||
from sqlalchemy.orm import Session | ||
from starlette import status | ||
from starlette.config import Config | ||
|
||
import routers.tag.tag_crud as tag_crud | ||
from core.database import get_db | ||
from core.models import models | ||
from core.schemas import tag | ||
from dependencies import get_current_user | ||
from routers.user.user_crud import pwd_context | ||
|
||
config = Config('.env') | ||
|
||
router = APIRouter( | ||
prefix="/api/tag", | ||
tags=["Tag"] | ||
) | ||
|
||
|
||
# Create | ||
@router.post("/tag_list", response_model=tag.TagList) | ||
def create_tag(tag_list: tag.TagStrList, db: Session = Depends(get_db)): | ||
print(tag_crud.get_tag_info_list(db, tag_list.tag_list)) | ||
pass | ||
|
||
#return {"tag_list": tag_crud.get_tag_list(db, tag_list.tag_list).tag_list} | ||
|
||
|
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