import { Router } from 'express';
import { getMapEvents } from './events.service';

export const eventsPublicRouter = Router();

// GET /public — public map events with resolved lat/lng
eventsPublicRouter.get('/public', async (_req, res, next) => {
  try {
    const events = await getMapEvents();
    res.json(events);
  } catch (err) {
    next(err);
  }
});
