"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.handleClusterInfo = handleClusterInfo;
const cluster_queries_1 = require("../components/cluster-queries");
const utils_1 = require("../utils");
async function handleClusterInfoImpl(req, res) {
    try {
        const { params: { ytAuthCluster }, } = req;
        const results = await (0, cluster_queries_1.getClusterInfo)(req, ytAuthCluster);
        return res.send(results);
    }
    catch (err) {
        return (0, utils_1.sendAndLogError)(req.ctx, res, 500, err);
    }
}
async function handleClusterInfo(req, res) {
    await handleClusterInfoImpl(req, res);
}
