@openinc/parse-server-opendash
Version:
Parse Server Cloud Code for open.INC Stack.
19 lines (18 loc) • 835 B
JavaScript
;
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),
};
});
}