WorkshopTasker/server/api/dbtest.get.ts

10 lines
301 B
TypeScript
Raw Permalink Normal View History

2023-05-11 06:03:22 +02:00
/* global defineEventHandler */
import { database } from "../utils/database";
export default defineEventHandler(async () => {
const [owo] = await database.execute("SELECT * FROM `sch_baza_smartfony`.`lombardy`");
return owo as {id: number, nazwa: string, adres: string, kontakt: string}[];
});