UNPKG

@openinc/parse-server-opendash

Version:
19 lines (18 loc) 835 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.init = init; const config_1 = require("../features/config"); async function init(name) { Parse.Cloud.define(name, async (request) => { const style = config_1.ConfigInstance.getInstance().get("GEO_VECTOR_STYLE"); const GoK = config_1.ConfigInstance.getInstance().get("GEO_GOOGLE_API_KEY"); const GHH = config_1.ConfigInstance.getInstance().get("GEO_GRAPHHOPPER_HOST"); const GHK = config_1.ConfigInstance.getInstance().get("GEO_GRAPHHOPPER_API_KEY"); return { "vector-style": style, "opendash-geo-google-autocomplete": !!GoK, "opendash-geo-graphhopper-geocode": !!(GHH && GHK), "opendash-geo-graphhopper-geocode-reverse": !!(GHH && GHK), }; }); }