Co-authored-by: Rolwin Monterio <rolwin@yellow.ai> Co-authored-by: olivermrbl <oliver@mrbltech.com>
14 lines
312 B
JavaScript
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)
|
|
}
|
|
}
|