import ApiService from "../services/api.js";
import dotenv from 'dotenv';

dotenv.config({path: ".env"});

class ApiController {
    async getChatMessages(req, res) {
        const {limit, offset} = req.params;

        const messages = await ApiService.getChatMessages(limit, offset);

        return res.status(200).send(messages);
    }

    async getWebsocketConnection(req, res) {
        return res.status(200).send(process.env.WS_CONNECTION_STRING)
    }
}

export default new ApiController();