diff --git a/endpoints/store.get.py b/endpoints/store.get.py index f8b92fb..40b0ea3 100644 --- a/endpoints/store.get.py +++ b/endpoints/store.get.py @@ -1,28 +1,13 @@ from fastapi import APIRouter, Depends, HTTPException, status -from sqlalchemy.orm import Session from typing import List -from core.database import get_db -from models.book import Book -from models.category import Category -from models.author import Author -from schemas.book import BookSchema, BookResponse -from schemas.category import CategorySchema -from schemas.author import AuthorSchema -from helpers.store_helpers import get_store_inventory, get_categories, get_authors +from models.country import Country +from schemas.country import CountrySchema +from helpers.country_helpers import get_asian_countries router = APIRouter() -@router.get("/store", status_code=200, response_model=BookResponse) -async def get_store_details( - db: Session = Depends(get_db) -): - """Get store inventory with books, categories and authors""" - books = get_store_inventory(db) - categories = get_categories(db) - authors = get_authors(db) - - return { - "books": books, - "categories": categories, - "authors": authors - } \ No newline at end of file +@router.get("/store", response_model=List[CountrySchema], status_code=200) +async def get_asian_countries_list(): + """Get list of countries in Asia""" + countries = get_asian_countries() + return countries \ No newline at end of file