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

View File

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