feat: Render diffs in email notifications (#4164)
* deps * diffCompact * Diffs in email * test * fix: Fade deleted images fix: Don't include empty paragraphs as context fix: Allow for same image multiple times and refactor * Remove target _blank * fix: Table heading incorrect color
This commit is contained in:
@@ -10,10 +10,7 @@ export default async function revisionCreator({
|
||||
user: User;
|
||||
ip?: string;
|
||||
}) {
|
||||
let transaction;
|
||||
|
||||
try {
|
||||
transaction = await sequelize.transaction();
|
||||
return sequelize.transaction(async (transaction) => {
|
||||
const revision = await Revision.createFromDocument(document, {
|
||||
transaction,
|
||||
});
|
||||
@@ -32,13 +29,6 @@ export default async function revisionCreator({
|
||||
transaction,
|
||||
}
|
||||
);
|
||||
await transaction.commit();
|
||||
return revision;
|
||||
} catch (err) {
|
||||
if (transaction) {
|
||||
await transaction.rollback();
|
||||
}
|
||||
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user