tomoya 2 years ago
parent
commit
ca5f09cab1

+ 1 - 2
backend/app/app/api/api_v1/api.py

@@ -1,10 +1,9 @@
 from fastapi import APIRouter
 
-from app.api.api_v1.endpoints import items, login, users, utils, videos
+from app.api.api_v1.endpoints import  login, users, utils, videos
 
 api_router = APIRouter()
 api_router.include_router(login.router, tags=["login"])
 api_router.include_router(users.router, prefix="/users", tags=["users"])
 api_router.include_router(utils.router, prefix="/utils", tags=["utils"])
-api_router.include_router(items.router, prefix="/items", tags=["items"])
 api_router.include_router(videos.router, prefix="/videos", tags=["videos"])

+ 2 - 0
backend/app/app/api/api_v1/endpoints/videos.py

@@ -45,6 +45,8 @@ def upload_plot(
     *,
     db: Session = Depends(deps.get_db),
     title: str=Form(...), 
+    anchor_id: int=Form(...),
+    lang_id: int=Form(...),
     upload_file: UploadFile=File(),
     current_user: models.User = Depends(deps.get_current_active_user),
 ) -> Any:

+ 0 - 1
backend/app/app/crud/__init__.py

@@ -1,4 +1,3 @@
-from .crud_item import item
 from .crud_user import user
 from .crud_video import video
 

+ 0 - 1
backend/app/app/models/user.py

@@ -6,7 +6,6 @@ from sqlalchemy.orm import relationship
 from app.db.base_class import Base
 
 if TYPE_CHECKING:
-    from .item import Item  # noqa: F401
     from .enum import Membership
 
 class User(Base):

+ 0 - 2
backend/app/app/schemas/__init__.py

@@ -1,5 +1,3 @@
-from .item import Item, ItemCreate, ItemInDB, ItemUpdate
-from .msg import Msg
 from .token import Token, TokenPayload
 from .user import User, UserCreate, UserInDB, UserUpdate
 from .video import Video, VideoCreate, VideoInDB, VideoUpdate

+ 0 - 39
backend/app/app/schemas/item.py

@@ -1,39 +0,0 @@
-from typing import Optional
-
-from pydantic import BaseModel
-
-
-# Shared properties
-class ItemBase(BaseModel):
-    title: Optional[str] = None
-    description: Optional[str] = None
-
-
-# Properties to receive on item creation
-class ItemCreate(ItemBase):
-    title: str
-
-
-# Properties to receive on item update
-class ItemUpdate(ItemBase):
-    pass
-
-
-# Properties shared by models stored in DB
-class ItemInDBBase(ItemBase):
-    id: int
-    title: str
-    owner_id: int
-
-    class Config:
-        orm_mode = True
-
-
-# Properties to return to client
-class Item(ItemInDBBase):
-    pass
-
-
-# Properties properties stored in DB
-class ItemInDB(ItemInDBBase):
-    pass

+ 0 - 5
backend/app/app/schemas/msg.py

@@ -1,5 +0,0 @@
-from pydantic import BaseModel
-
-
-class Msg(BaseModel):
-    msg: str

+ 2 - 2
backend/app/app/utils.py

@@ -3,8 +3,8 @@ from datetime import datetime, timedelta
 from pathlib import Path
 from typing import Any, Dict, Optional
 
-import emails
-from emails.template import JinjaTemplate
+#import emails
+#from emails.template import JinjaTemplate
 from jose import jwt
 
 from app.core.config import settings