@blessmesanta/strapi-google-maps
Version:
A Google Maps custom field for Strapi, allowing you to pick a location.
25 lines (24 loc) • 777 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const config_1 = require("../content-types/config");
exports.default = ({ strapi }) => ({
async index(ctx) {
const config = await strapi // @ts-ignore Strapi typings are incomplete
.plugin('google-maps')
.service('config')
.retrieve();
ctx.body = {
data: config,
};
},
async update(ctx) {
const data = await (0, config_1.sanitizeConfigInput)(ctx.request.body, ctx);
const config = await strapi // @ts-ignore Strapi typings are incomplete
.plugin('google-maps')
.service('config')
.update(data);
ctx.body = {
data: config,
};
},
});