test zapier

This commit is contained in:
Frédéric FRANCE 2021-06-04 22:16:25 +02:00
parent 0147ffa737
commit 3fb1fb63b4
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ const createThirdparty = async (z, bundle) => {
const response = await z.request({ const response = await z.request({
method: 'POST', method: 'POST',
url: apiurl, url: apiurl,
body: JSON.stringify({ body: {
name: bundle.inputData.name, name: bundle.inputData.name,
name_alias: bundle.inputData.name_alias, name_alias: bundle.inputData.name_alias,
ref_ext: bundle.inputData.ref_ext, ref_ext: bundle.inputData.ref_ext,
@ -24,7 +24,7 @@ const createThirdparty = async (z, bundle) => {
code_client: bundle.inputData.code_client, code_client: bundle.inputData.code_client,
code_fournisseur: bundle.inputData.code_fournisseur, code_fournisseur: bundle.inputData.code_fournisseur,
sens: 'fromzapier' sens: 'fromzapier'
}) }
}); });
const result = z.JSON.parse(response.content); const result = z.JSON.parse(response.content);
// api returns an integer when ok, a json when ko // api returns an integer when ok, a json when ko

View File

@ -15,7 +15,7 @@
"npm": ">=5.6.0" "npm": ">=5.6.0"
}, },
"dependencies": { "dependencies": {
"zapier-platform-core": "11.0.0" "zapier-platform-core": "11.0.1"
}, },
"devDependencies": { "devDependencies": {
"mocha": "^5.2.0", "mocha": "^5.2.0",