Skip to content

Commit

Permalink
feat: operator $params to define an array of params and their data/va…
Browse files Browse the repository at this point in the history
…lues.
  • Loading branch information
frankpagan committed Jan 28, 2024
1 parent 6bde772 commit 31b6ec7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ class CoCreateLazyLoader {
if (typeof method !== 'function')
throw new Error(`Method ${data.method} is not a function.`);

data.postmark = await method.apply(instance, [data[name]]);
let params = data.$params || [data[name]]
data.postmark = await method.apply(instance, params);
return data
} catch (error) {
data.error = error.message
Expand Down

0 comments on commit 31b6ec7

Please sign in to comment.