mirror of
https://github.com/outline/outline.git
synced 2026-11-26 23:50:14 +03:00
Remove explicit passing of transaction to createWithContext
This commit is contained in:
1 parent
774402560e
commit
aa579412d0
3 files changed
+24
-42
No files matched your search
@@ -710,19 +710,13 @@ router.post(
|
||||
}
|
||||
|
||||
await collection.save({ transaction });
|
||||
await Event.createFromContext(
|
||||
ctx,
|
||||
{
|
||||
name: "collections.update",
|
||||
collectionId: collection.id,
|
||||
data: {
|
||||
name,
|
||||
},
|
||||
await Event.createFromContext(ctx, {
|
||||
name: "collections.update",
|
||||
collectionId: collection.id,
|
||||
data: {
|
||||
name,
|
||||
},
|
||||
{
|
||||
transaction,
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
if (privacyChanged || sharingChanged) {
|
||||
await Event.createFromContext(ctx, {
|
||||
|
||||
@@ -390,18 +390,14 @@ router.post(
|
||||
});
|
||||
|
||||
if (created) {
|
||||
await Event.createFromContext(
|
||||
ctx,
|
||||
{
|
||||
name: "comments.add_reaction",
|
||||
modelId: comment.id,
|
||||
documentId: comment.documentId,
|
||||
data: {
|
||||
emoji,
|
||||
},
|
||||
await Event.createFromContext(ctx, {
|
||||
name: "comments.add_reaction",
|
||||
modelId: comment.id,
|
||||
documentId: comment.documentId,
|
||||
data: {
|
||||
emoji,
|
||||
},
|
||||
{ transaction }
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
ctx.body = {
|
||||
@@ -446,18 +442,14 @@ router.post(
|
||||
|
||||
await reaction.destroy({ transaction });
|
||||
|
||||
await Event.createFromContext(
|
||||
ctx,
|
||||
{
|
||||
name: "comments.remove_reaction",
|
||||
modelId: comment.id,
|
||||
documentId: comment.documentId,
|
||||
data: {
|
||||
emoji,
|
||||
},
|
||||
await Event.createFromContext(ctx, {
|
||||
name: "comments.remove_reaction",
|
||||
modelId: comment.id,
|
||||
documentId: comment.documentId,
|
||||
data: {
|
||||
emoji,
|
||||
},
|
||||
{ transaction }
|
||||
);
|
||||
});
|
||||
|
||||
ctx.body = {
|
||||
success: true,
|
||||
|
||||
@@ -163,14 +163,10 @@ router.post(
|
||||
|
||||
await integration.destroy({ transaction });
|
||||
|
||||
await Event.createFromContext(
|
||||
ctx,
|
||||
{
|
||||
name: "integrations.delete",
|
||||
modelId: integration.id,
|
||||
},
|
||||
{ transaction }
|
||||
);
|
||||
await Event.createFromContext(ctx, {
|
||||
name: "integrations.delete",
|
||||
modelId: integration.id,
|
||||
});
|
||||
|
||||
ctx.body = {
|
||||
success: true,
|
||||
|
||||
Reference in new issue
Block a user