diff --git a/endpoints/playlist.get.py b/endpoints/playlist.get.py index 28cf47a..26ac5d8 100644 --- a/endpoints/playlist.get.py +++ b/endpoints/playlist.get.py @@ -2,16 +2,16 @@ from fastapi import APIRouter, Depends, HTTPException, status from sqlalchemy.orm import Session from typing import List from core.database import get_db -from models.playlist import Playlist -from schemas.playlist import PlaylistSchema -from helpers.playlist_helpers import get_all_playlists +from models.food import Food +from schemas.food import FoodSchema +from helpers.food_helpers import get_pantry_foods router = APIRouter() -@router.get("/playlist", status_code=200, response_model=List[PlaylistSchema]) -async def get_playlists( +@router.get("/pantry", status_code=200, response_model=List[FoodSchema]) +async def get_pantry_foods( db: Session = Depends(get_db) ): - """Get all playlists""" - playlists = get_all_playlists(db) - return playlists \ No newline at end of file + """Get all foods in pantry""" + foods = get_pantry_foods(db) + return foods \ No newline at end of file