Skip to content

Commit ead8131

Browse files
author
Ruslan Tereshchenko
committed
add option to delete original document in applet
1 parent fc2673d commit ead8131

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

samples/applets/template-field-invite.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/*
22
* to run template field invite applet from the project root folder type in your console:
3-
* > node samples/applets/template-field-invite <cliend_id> <client_secret> <username> <password> <path_to_file> '<fields_stringified>' <template_name> '<invite_stringified>'
3+
* > node samples/applets/template-field-invite <cliend_id> <client_secret> <username> <password> <path_to_file> '<fields_stringified>' <template_name> '<invite_stringified>' <delete_original>
44
* <cliend_id>, <client_secret>, <username>, <password>, <path_to_file>, <fields_stringified>, <template_name>, <invite_stringified> - are required params
5+
* <delete_original> - optional param. If ommited defaults to false
56
*/
67

78
'use strict';
@@ -15,6 +16,7 @@ const [
1516
fieldsStringified,
1617
templateName,
1718
inviteStringified,
19+
removeOriginalDocument,
1820
] = process.argv.slice(2);
1921

2022
const api = require('../../lib')({
@@ -76,6 +78,7 @@ getAccessToken({
7678
createTemplate({
7779
document_id: id,
7880
document_name: templateName,
81+
options: { removeOriginalDocument: removeOriginalDocument === 'true' },
7982
token,
8083
}, (templateErr, templateRes) => {
8184
if (templateErr) {

0 commit comments

Comments
 (0)