π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
fix(permissions): look up the refreshed channel by internalId in the channel limit check
Gilad Resisi326719b33859
diff --git a/apps/backend/src/services/auth/permissions/permissions.service.ts b/apps/backend/src/services/auth/permissions/permissions.service.tsindex 75223fbbf..173368ea9 100644--- a/apps/backend/src/services/auth/permissions/permissions.service.ts+++ b/apps/backend/src/services/auth/permissions/permissions.service.ts@@ -70,7 +70,7 @@ export class PermissionsService {// but only if the channel actually belongs to this orgif (refreshChannelId) {const existingIntegration =- await this._integrationService.getIntegrationById(+ await this._integrationService.getIntegrationByInternalId(orgId,refreshChannelId);diff --git a/libraries/nestjs-libraries/src/database/prisma/integrations/integration.service.ts b/libraries/nestjs-libraries/src/database/prisma/integrations/integration.service.tsindex be87d0006..992121fa6 100644--- a/libraries/nestjs-libraries/src/database/prisma/integrations/integration.service.ts+++ b/libraries/nestjs-libraries/src/database/prisma/integrations/integration.service.ts@@ -179,6 +179,13 @@ export class IntegrationService {return this._integrationRepository.getIntegrationById(org, id);}+ getIntegrationByInternalId(org: string, internalId: string) {+ return this._integrationRepository.getIntegrationByInternalId(+ org,+ internalId+ );+ }+async refreshToken(provider: SocialProvider, refresh: string) {try {const { refreshToken, accessToken, expiresIn } =