import { getDb } from '../utils/db.js'

export default defineEventHandler(async () => {
  const { all } = await getDb()
  const rows = await all('SELECT id, lat, lng, label, icon_type FROM pois ORDER BY id')
  return rows
})
