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 router = APIRouter() @router.get("/playlist", status_code=200, response_model=List[PlaylistSchema]) async def get_playlists( db: Session = Depends(get_db) ): """Get all playlists""" playlists = get_all_playlists(db) return playlists