Added confirmations for unsubscribe, blacklist and remove from blacklist
This commit is contained in:
parent
aeaaf116d7
commit
b058169e12
25 changed files with 290 additions and 228 deletions
|
@ -177,10 +177,6 @@ async function remove(context, id) {
|
|||
await knex.transaction(async tx => {
|
||||
await shares.enforceEntityPermissionTx(tx, context, 'list', id, 'delete');
|
||||
|
||||
await fields.removeAllByListIdTx(tx, context, id);
|
||||
await segments.removeAllByListIdTx(tx, context, id);
|
||||
await imports.removeAllByListIdTx(tx, context, id);
|
||||
|
||||
await dependencyHelpers.ensureNoDependencies(tx, context, id, [
|
||||
{
|
||||
entityTypeId: 'campaign',
|
||||
|
@ -191,6 +187,10 @@ async function remove(context, id) {
|
|||
}
|
||||
]);
|
||||
|
||||
await fields.removeAllByListIdTx(tx, context, id);
|
||||
await segments.removeAllByListIdTx(tx, context, id);
|
||||
await imports.removeAllByListIdTx(tx, context, id);
|
||||
|
||||
await tx('lists').where('id', id).del();
|
||||
await knex.schema.dropTableIfExists('subscription__' + id);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue