fix: Connecting Slack channel sometimes fails with 404
This commit is contained in:
@@ -173,9 +173,7 @@ if (env.SLACK_CLIENT_ID && env.SLACK_CLIENT_SECRET) {
|
|||||||
case IntegrationType.Post: {
|
case IntegrationType.Post: {
|
||||||
const collection = await Collection.scope({
|
const collection = await Collection.scope({
|
||||||
method: ["withMembership", user.id],
|
method: ["withMembership", user.id],
|
||||||
}).findByPk(collectionId, {
|
}).findByPk(collectionId);
|
||||||
rejectOnEmpty: true,
|
|
||||||
});
|
|
||||||
authorize(user, "read", collection);
|
authorize(user, "read", collection);
|
||||||
authorize(user, "update", user.team);
|
authorize(user, "update", user.team);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user