@bprotsyk/aso-core 2.1.53 → 2.1.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -255,7 +255,11 @@ async function cloneOWCampaign(app) {
|
|
|
255
255
|
state: stream.state
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
|
-
|
|
258
|
+
await http_1.default.put(`/campaigns/${newCampaign.id}`, {
|
|
259
|
+
group_id: originalCampaign.group_id
|
|
260
|
+
});
|
|
261
|
+
const updatedCampaign = await getCampaignById(newCampaign.id);
|
|
262
|
+
return updatedCampaign;
|
|
259
263
|
}
|
|
260
264
|
async function cloneDCampaign(app) {
|
|
261
265
|
let name = `D #${app.id} (${app.bundle})`;
|
package/package.json
CHANGED
|
@@ -326,11 +326,19 @@ async function cloneOWCampaign(app: IApp): Promise<IKeitaroCampaign | any> {
|
|
|
326
326
|
state: stream.state
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
|
+
await keitaroApi.put(`/campaigns/${newCampaign.id}`, {
|
|
330
|
+
group_id: originalCampaign.group_id
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
const updatedCampaign = await getCampaignById(newCampaign.id);
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
329
337
|
|
|
330
338
|
|
|
331
339
|
|
|
332
340
|
|
|
333
|
-
return
|
|
341
|
+
return updatedCampaign;
|
|
334
342
|
}
|
|
335
343
|
|
|
336
344
|
async function cloneDCampaign(app: IApp): Promise<IKeitaroCampaign> {
|
package/test-keitaro.js
CHANGED
|
@@ -2,7 +2,7 @@ const { KeitaroService } = require('./lib/network/keitaro/keitaro-service');
|
|
|
2
2
|
|
|
3
3
|
async function testClone() {
|
|
4
4
|
try {
|
|
5
|
-
const result = await KeitaroService.cloneOWCampaign({ id:
|
|
5
|
+
const result = await KeitaroService.cloneOWCampaign({ id: 750 });
|
|
6
6
|
console.log('Cloned campaign:', result);
|
|
7
7
|
} catch (error) {
|
|
8
8
|
console.error('Error:', error);
|