@kustomer/apps-common
Advanced tools
Comparing version 0.3.5 to 0.3.6
@@ -14,3 +14,5 @@ "use strict"; | ||
async run(name, body) { | ||
const fullName = `${this.options.app}.app.${(0, utils_1.namespace)(name, this.options)}`; | ||
const shouldAppendOrg = this.options.visibility === 'private' && | ||
!this.options.app.split('_').includes(this.orgNameOrId); | ||
const fullName = `${this.options.app}${shouldAppendOrg ? `_${this.orgNameOrId}` : ''}.app.${(0, utils_1.namespace)(name, this.options)}`; | ||
const res = await this.axios.post(`/v1/commands/${fullName}/run`, { body }); | ||
@@ -17,0 +19,0 @@ return res.data.data.attributes; |
@@ -11,3 +11,5 @@ import { namespace } from '../utils'; | ||
async run(name, body) { | ||
const fullName = `${this.options.app}.app.${namespace(name, this.options)}`; | ||
const shouldAppendOrg = this.options.visibility === 'private' && | ||
!this.options.app.split('_').includes(this.orgNameOrId); | ||
const fullName = `${this.options.app}${shouldAppendOrg ? `_${this.orgNameOrId}` : ''}.app.${namespace(name, this.options)}`; | ||
const res = await this.axios.post(`/v1/commands/${fullName}/run`, { body }); | ||
@@ -14,0 +16,0 @@ return res.data.data.attributes; |
{ | ||
"name": "@kustomer/apps-common", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "main": "cjs/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
320566
3793