mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
Remove explicit passing of transaction to createWithContext
This commit is contained in:
@@ -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