import Express from "../Utils/Express";
import Response from "../Utils/Response";
import { IpWhitelist } from "../EnvironmentConfig";
export default class IPWhitelistAPI {
    static init() {
        const router = Express.getRouter();
        router.get("/ip-whitelist", (req, res) => {
            const ipList = IpWhitelist
                ? IpWhitelist.split(",")
                    .map((ip) => {
                    return ip.trim();
                })
                    .filter((ip) => {
                    return ip.length > 0;
                })
                : [];
            Response.sendJsonObjectResponse(req, res, {
                ipWhitelist: ipList,
            });
        });
        return router;
    }
}
//# sourceMappingURL=IPWhitelistAPI.js.map