From 082901e4e7f9402b56933321fc6099298c781333 Mon Sep 17 00:00:00 2001 From: sedrubal Date: Sun, 10 Nov 2019 00:43:41 +0100 Subject: [PATCH] Add Field `cid` to `/api/lists/:email` With this `cid` you are able to do further API calls like unsubscribing the user from all mailing lists. --- server/models/subscriptions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/models/subscriptions.js b/server/models/subscriptions.js index dd99841d..06450f0c 100644 --- a/server/models/subscriptions.js +++ b/server/models/subscriptions.js @@ -863,7 +863,7 @@ async function getListsWithEmail(context, email) { // FIXME - this methods is rather suboptimal if there are many lists. It quite needs permission caching in shares.js return await knex.transaction(async tx => { - const lsts = await tx('lists').select(['id', 'name']); + const lsts = await tx('lists').select(['id', 'cid', 'name']); const result = []; for (const list of lsts) {