File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,22 @@ class Script extends MetadataType {
8383 return super . updateREST ( script , '/automation/v1/scripts/' + script . ssjsActivityId ) ;
8484 }
8585
86+ /**
87+ * helper for {@link MetadataType.updateREST} and {@link MetadataType.updateSOAP}
88+ *
89+ * @param {MetadataTypeItem } metadataEntry a single metadata Entry
90+ * @param {object } apiResponse varies depending on the API call
91+ * @returns {Promise.<object> } apiResponse, potentially modified
92+ */
93+ static async postUpdateTasks ( metadataEntry , apiResponse ) {
94+ // script update endpoint returns wrong values for createdDate and modifiedDate - need to re-retrieve to get correct values
95+ const ssjsActivityId = apiResponse ?. ssjsActivityId ;
96+ if ( ssjsActivityId ) {
97+ apiResponse = await this . client . rest . get ( '/automation/v1/scripts/' + ssjsActivityId ) ;
98+ }
99+ return apiResponse ;
100+ }
101+
86102 /**
87103 * Creates a single Script
88104 *
You can’t perform that action at this time.
0 commit comments