[rewrite] WIP login and register

This commit is contained in:
Thastertyn committed 2025-03-11 21:53:37 +01:00
1 parent f5547be799
commit cd8fdb9c21
9 files changed
+38 -62

No files matched your search

+9 -3
View File
@@ -1,8 +1,14 @@
from typing import Annotated
from fastapi import APIRouter
from app.api.routes.shop import shop_login_routes, shop_user_routes
api_router = APIRouter()
shop_router = APIRouter(
prefix="/shop/{shop_uuid}",
tags=["Shop"]
)
api_router.include_router(shop_login_routes.router)
api_router.include_router(shop_user_routes.router)
shop_router.include_router(shop_login_routes.router)
shop_router.include_router(shop_user_routes.router)
@@ -3,7 +3,7 @@ from typing import Annotated
from fastapi import APIRouter, Body, Path
from app.schemas.user_schemas import UserRegisterSchema, UserLoginSchema
from app.schemas.user_schemas import UserRegister
router = APIRouter(
@@ -17,18 +17,13 @@ async def delete_user(shop_uuid=Annotated[uuid.UUID, Path(title="UUID of the sho
raise NotImplementedError("delete_user() needs to be implemented.")
@router.post("/login", summary="User login")
async def login(login_data: UserLoginSchema, shop_uuid=Annotated[uuid.UUID, Path(title="UUID of the shop")]):
raise NotImplementedError("login() needs to be implemented.")
@router.delete("/logout", summary="User logout")
async def logout():
raise NotImplementedError("logout() needs to be implemented.")
@router.post("/register", summary="Register new user")
async def register(user_data: UserRegisterSchema):
async def register(user_data: UserRegister):
raise NotImplementedError()