Commit b03368dab31b203f32412276b90cd442ed304ba5

Authored by Adhidarma Hadiwinoto
1 parent eab2bc557d
Exists in master

include webhookType di filename dumper

Showing 1 changed file with 6 additions and 2 deletions Side-by-side Diff

lib/webhook-sender.js
... ... @@ -34,9 +34,13 @@ const dumper = async (xid, webhookType, body) => {
34 34 }
35 35  
36 36 try {
37   - const filename = [moment().format('YYYYMMDD-HHmmssSSS'), xid].join('_');
  37 + const filename = [
  38 + [moment().format('YYYYMMDD-HHmmssSSS'), xid].join('_'),
  39 + webhookType,
  40 + 'json',
  41 + ].join('.');
38 42 await fs.promises.writeFile(
39   - path.join(baseDumpDir, `${filename}.json`),
  43 + path.join(baseDumpDir, filename),
40 44 stringify({ webhookType, body }),
41 45 );
42 46