import { NextResponse } from 'next/server';
import db from '@/db';

export async function GET() {
  const photos = db.prepare('SELECT * FROM media WHERE type = ?').all('photo');
  return NextResponse.json(photos);
}