Spaces:
Sleeping
Sleeping
Upload app/api/seed.py
Browse files- app/api/seed.py +1 -1
app/api/seed.py
CHANGED
|
@@ -54,7 +54,7 @@ def get_image_url(parent_category: str, product_name: str, index: int):
|
|
| 54 |
# Unsplash Source with specific query and signature to ensure uniqueness and brand relevance
|
| 55 |
return f"https://source.unsplash.com/featured/800x1000?{brand_keyword},{parent_category}&sig={unique_sig}"
|
| 56 |
|
| 57 |
-
@router.
|
| 58 |
async def seed_database(clear: bool = False, db: Session = Depends(get_db)):
|
| 59 |
"""Populate database with proper product data, optionally clearing existing data first."""
|
| 60 |
if clear:
|
|
|
|
| 54 |
# Unsplash Source with specific query and signature to ensure uniqueness and brand relevance
|
| 55 |
return f"https://source.unsplash.com/featured/800x1000?{brand_keyword},{parent_category}&sig={unique_sig}"
|
| 56 |
|
| 57 |
+
@router.api_route("", methods=["GET", "POST"], response_model=AuthResponse)
|
| 58 |
async def seed_database(clear: bool = False, db: Session = Depends(get_db)):
|
| 59 |
"""Populate database with proper product data, optionally clearing existing data first."""
|
| 60 |
if clear:
|