fix: Connecting Slack channel sometimes fails with 404

This commit is contained in:
Tom Moor
2024-04-30 08:54:23 -04:00
parent f7ea19cfcd
commit 3298a1cd7d

View File

@@ -173,9 +173,7 @@ if (env.SLACK_CLIENT_ID && env.SLACK_CLIENT_SECRET) {
case IntegrationType.Post: {
const collection = await Collection.scope({
method: ["withMembership", user.id],
}).findByPk(collectionId, {
rejectOnEmpty: true,
});
}).findByPk(collectionId);
authorize(user, "read", collection);
authorize(user, "update", user.team);