import { Request, Response, NextFunction } from 'express';
import { TimezoneService } from '../services/TimezoneService';

export class TimezoneController {
  constructor(private timezoneService = new TimezoneService()) {}

  list = async (_req: Request, res: Response, next: NextFunction) => {
    try {
      const result = await this.timezoneService.listGrouped();
      res.json(result);
    } catch (err) {
      next(err);
    }
  };
}
