Skip to content

Commit

Permalink
feat: add a command to add data to lodash string template evaluation …
Browse files Browse the repository at this point in the history
…context
  • Loading branch information
robinbourianes-kalisio committed Nov 29, 2024
1 parent da8e3fd commit fa3633e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/boot/kdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ postRobot.on('setConfiguration', async (event) => {
_.set(config, key, value)
})
})
// Add data to lodash string evaluation context
postRobot.on('setTemplateContext', async (event) => {
const ctx = TemplateContext.get()
_.forOwn(event.data, (value, key) => {
_.set(ctx, key, value)
})
})

export default async ({ app, router }) => {
// Required to make injections reactively linked to the provider
Expand Down

0 comments on commit fa3633e

Please sign in to comment.