Files
medusa-store/packages/medusa-plugin-algolia/src/loaders/index.js
Rolwin Reevan Monteiro 8ce9b20222 feat: Algolia plugin for medusa (#718)
Co-authored-by: Rolwin Monterio <rolwin@yellow.ai>
Co-authored-by: olivermrbl <oliver@mrbltech.com>
2021-11-12 14:10:00 +01:00

14 lines
312 B
JavaScript

export default async (container, options) => {
try {
const algoliaService = container.resolve("algoliaService")
await Promise.all(
Object.entries(options.settings).map(([key, value]) =>
algoliaService.updateSettings(key, value)
)
)
} catch (err) {
console.log(err)
}
}