Obsoleting some old files

Transition to SPA-style client
Basis for Mosaico template editor
This commit is contained in:
Tomas Bures 2018-02-25 20:54:15 +01:00
parent 7750232716
commit c85f2d4440
942 changed files with 86311 additions and 967 deletions

View file

@ -134,6 +134,24 @@ async function removeFormFromAllTx(tx, context, formId) {
});
}
async function getMergeTags(context, id) {
return await knex.transaction(async tx => {
await shares.enforceEntityPermissionTx(tx, context, 'list', id, ['view']);
const groupedFields = await fields.listGroupedTx(tx, id);
const mergeTags = [];
for (const field of groupedFields) {
mergeTags.push({
key: field.key,
value: field.name
});
}
return mergeTags;
});
}
module.exports = {
UnsubscriptionMode,
@ -145,5 +163,6 @@ module.exports = {
create,
updateWithConsistencyCheck,
remove,
removeFormFromAllTx
removeFormFromAllTx,
getMergeTags
};