From c1f3f4aeff5f8a3676a82302d45be8adf33a161c Mon Sep 17 00:00:00 2001 From: Sokratis Vidros Date: Thu, 7 Nov 2024 16:09:00 +0200 Subject: [PATCH 1/2] fix(dashboard): Make step prefix shorter --- apps/dashboard/src/components/workflow-editor/schema.ts | 2 +- packages/shared/src/types/shared/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/src/components/workflow-editor/schema.ts b/apps/dashboard/src/components/workflow-editor/schema.ts index 96c21c672ff..0c78ace3da1 100644 --- a/apps/dashboard/src/components/workflow-editor/schema.ts +++ b/apps/dashboard/src/components/workflow-editor/schema.ts @@ -30,7 +30,7 @@ export const workflowSchema = z.object({ type: z.nativeEnum(StepTypeEnum), _id: z.string(), stepId: z.string(), - slug: z.literal('_stp_'), + slug: z.literal('_st_'), }) .passthrough() ), diff --git a/packages/shared/src/types/shared/index.ts b/packages/shared/src/types/shared/index.ts index e3a9be3e98d..137eb7113ae 100644 --- a/packages/shared/src/types/shared/index.ts +++ b/packages/shared/src/types/shared/index.ts @@ -33,7 +33,7 @@ export type WorkflowName = string; export enum ShortIsPrefixEnum { WORKFLOW = 'wf_', - STEP = 'stp_', + STEP = 'st_', ENVIRONMENT = 'env_', } From 580f65070931682224c8446b8252083dbeaf05f3 Mon Sep 17 00:00:00 2001 From: Sokratis Vidros Date: Thu, 7 Nov 2024 16:20:26 +0200 Subject: [PATCH 2/2] fix(api): Remove caching from fetching topics per subscriber Prevent stale responses --- .../usecases/get-subscriber/get-subscriber.usecase.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/apps/api/src/app/subscribers/usecases/get-subscriber/get-subscriber.usecase.ts b/apps/api/src/app/subscribers/usecases/get-subscriber/get-subscriber.usecase.ts index 1d8a4987421..86460f542ae 100644 --- a/apps/api/src/app/subscribers/usecases/get-subscriber/get-subscriber.usecase.ts +++ b/apps/api/src/app/subscribers/usecases/get-subscriber/get-subscriber.usecase.ts @@ -48,13 +48,6 @@ export class GetSubscriber { return await this.subscriberRepository.findBySubscriberId(_environmentId, subscriberId); } - @CachedEntity({ - builder: (command: { subscriberId: string; _environmentId: string }) => - buildSubscriberTopicsKey({ - _environmentId: command._environmentId, - subscriberId: command.subscriberId, - }), - }) private async fetchSubscriberTopics({ subscriberId, _environmentId,