generated from StartDown/MicroservicesExample
restored
This commit is contained in:
0
app/api/v1/B2B/__init__.py
Normal file
0
app/api/v1/B2B/__init__.py
Normal file
36
app/api/v1/B2B/admin.py
Normal file
36
app/api/v1/B2B/admin.py
Normal file
@@ -0,0 +1,36 @@
|
||||
from fastapi import APIRouter, Query, Header
|
||||
|
||||
|
||||
router = APIRouter(
|
||||
prefix="/b2b",
|
||||
tags=["b2b"]
|
||||
)
|
||||
|
||||
|
||||
@router.post("/products/{id}")
|
||||
def create_product(
|
||||
id: int,
|
||||
token: str = Header(..., description="Authorization token", alias="Authorization"),
|
||||
) -> dict:
|
||||
pass
|
||||
|
||||
@router.put("/products/{id}")
|
||||
def update_product(
|
||||
id: int,
|
||||
token: str = Header(..., description="Authorization token", alias="Authorization"),
|
||||
) -> dict:
|
||||
pass
|
||||
|
||||
@router.delete("/products/{id}")
|
||||
def delete_product(
|
||||
id: int,
|
||||
token: str = Header(..., description="Authorization token", alias="Authorization"),
|
||||
) -> dict:
|
||||
pass
|
||||
|
||||
@router.post("/products/{id}/related")
|
||||
def create_related(
|
||||
id: int,
|
||||
token: str = Header(..., description="Authorization token", alias="Authorization"),
|
||||
) -> dict:
|
||||
pass
|
||||
0
app/api/v1/B2C/__init__.py
Normal file
0
app/api/v1/B2C/__init__.py
Normal file
61
app/api/v1/B2C/products.py
Normal file
61
app/api/v1/B2C/products.py
Normal file
@@ -0,0 +1,61 @@
|
||||
from fastapi import APIRouter, Query, Header
|
||||
|
||||
|
||||
router = APIRouter(
|
||||
prefix="/b2c",
|
||||
tags=["b2c"]
|
||||
)
|
||||
|
||||
|
||||
@router.get("/products")
|
||||
def get_products(
|
||||
page: str = Query(..., description="page", alias="Page"),
|
||||
limit: str = Query(..., description="limit of the items", alias="Limit"),
|
||||
) -> list[dict]:
|
||||
# cache goes here
|
||||
pass
|
||||
|
||||
@router.get("/products/{id}")
|
||||
def get_product_by_id(
|
||||
id: int,
|
||||
page: str = Query(..., description="page", alias="Page"),
|
||||
limit: str = Query(..., description="limit of the items", alias="Limit"),
|
||||
) -> list[dict]:
|
||||
# cache goes here
|
||||
pass
|
||||
|
||||
@router.get("/products/search")
|
||||
def search(
|
||||
search_query: str = Query(..., description="Search query"),
|
||||
filters: str = Query(..., description="Filters"),
|
||||
categories: str = Query(..., description="Categories")
|
||||
) -> list[dict]:
|
||||
# cache goes here
|
||||
pass
|
||||
|
||||
@router.get("/products/{id}/related")
|
||||
def get_related(
|
||||
id: int,
|
||||
page: str = Query(..., description="page", alias="Page"),
|
||||
limit: str = Query(..., description="limit of the items", alias="Limit"),
|
||||
) -> list[dict]:
|
||||
# cache goes here
|
||||
pass
|
||||
|
||||
@router.get("/products/featured")
|
||||
def get_promo(
|
||||
page: str = Query(..., description="page", alias="Page"),
|
||||
limit: str = Query(..., description="limit of the items", alias="Limit"),
|
||||
) -> list[dict]:
|
||||
# cache goes here
|
||||
pass
|
||||
|
||||
@router.get("/discounted")
|
||||
def get_discount(
|
||||
page: str = Query(..., description="page", alias="Page"),
|
||||
limit: str = Query(..., description="limit of the items", alias="Limit"),
|
||||
) -> list[dict]:
|
||||
# cache goes here
|
||||
pass
|
||||
|
||||
|
||||
0
app/api/v1/__init__.py
Normal file
0
app/api/v1/__init__.py
Normal file
Reference in New Issue
Block a user