Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports.config = (apiKey) => {
};

const api = {
run(action, d, outputs, cb) {
run(action, d, opts, cb) {
if (scope.key && scope.key.startsWith('demo')) {
return maybe(cb, new Promise((resolve) => {
console.log('This is a demo API key!'.red);
Expand All @@ -41,8 +41,8 @@ const api = {
let callback = cb;

// Make outputs an optional parameter
if (typeof outputs === 'function') {
callback = outputs;
if (typeof opts === 'function') {
callback = opts;
}

// If no data is passed in, default to {}
Expand Down Expand Up @@ -80,7 +80,7 @@ const api = {
}

return maybe(callback, new Promise((resolve, reject) => {
return invoke(scope.key, scope.service, action, data, { outputs }).then((response) => {
return invoke(scope.key, scope.service, action, data, opts).then((response) => {
return resolve(response);
}).catch((err) => {
return reject(err);
Expand Down