diff --git a/apps/ops/src/api/campaigns.js b/apps/ops/src/api/campaigns.js index d4ae901..b7c2d08 100644 --- a/apps/ops/src/api/campaigns.js +++ b/apps/ops/src/api/campaigns.js @@ -69,6 +69,14 @@ export function sendCampaign (id) { }) } +// Permanent deletion — removes the JSON on the hub. Used for clearing +// test campaigns from the list. Giftbit shortlinks are unaffected. +export function deleteCampaign (id) { + return hubFetch(`/campaigns/${encodeURIComponent(id)}`, { + method: 'DELETE', + }) +} + // Build the URL the browser hits to download the per-recipient CSV report // (giftbit shortlink ↔ email ↔ name ↔ status). The hub serves it with the // proper Content-Disposition so an click triggers a save. diff --git a/apps/ops/src/modules/campaigns/pages/CampaignsListPage.vue b/apps/ops/src/modules/campaigns/pages/CampaignsListPage.vue index bee226a..2d0f5b1 100644 --- a/apps/ops/src/modules/campaigns/pages/CampaignsListPage.vue +++ b/apps/ops/src/modules/campaigns/pages/CampaignsListPage.vue @@ -49,7 +49,14 @@ @@ -58,8 +65,10 @@