import {bd} from '@/lib/bd';
import {NextResponse} from "next/server";

export async function GET(){
    try {
        const [rows] = await bd.query('SELECT * FROM rooms');
        return NextResponse.json(rows);
    }catch (error){
        return NextResponse.json({message: 'Ошибка запроса', error: error}, {status:500})
    }
}