From ed71e3037907be31ee8eb5a3c3c6b08f98cc3a2c Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Fri, 28 Mar 2025 18:34:30 +0000 Subject: [PATCH] Update code in endpoints/playlist.get.py --- endpoints/playlist.get.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/endpoints/playlist.get.py b/endpoints/playlist.get.py index 11ef840..28cf47a 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.food import Food -from schemas.food import FoodSchema -from helpers.food_helpers import get_all_foods +from models.playlist import Playlist +from schemas.playlist import PlaylistSchema +from helpers.playlist_helpers import get_all_playlists router = APIRouter() -@router.get("/foods", status_code=200, response_model=List[FoodSchema]) -async def get_foods( +@router.get("/playlist", status_code=200, response_model=List[PlaylistSchema]) +async def get_playlists( db: Session = Depends(get_db) ): - """Get all foods for shopping""" - foods = get_all_foods(db) - return foods \ No newline at end of file + """Get all playlists""" + playlists = get_all_playlists(db) + return playlists \ No newline at end of file