Skip to content

Commit

Permalink
fix(api): no module errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarco committed Oct 10, 2024
1 parent bd99efc commit c2e3b39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { createHmac } from 'crypto';
import axios, { AxiosResponse } from 'axios';
import { BadRequestException, Injectable } from '@nestjs/common';
import { PostActionEnum, HttpQueryKeysEnum } from '@novu/framework';
import { Event, HttpQueryKeysEnum, PostActionEnum } from '@novu/framework';

import { EnvironmentRepository } from '@novu/dal';
import { Event, PostActionEnum } from '@novu/framework';
import { EnvironmentEntity, EnvironmentRepository } from '@novu/dal';
import { decryptApiKey } from '@novu/application-generic';
import { PreviewStepCommand } from './preview-step.command';
Expand Down Expand Up @@ -49,7 +47,7 @@ export class PreviewStep {
bridgeActionUrl.searchParams.set(HttpQueryKeysEnum.WORKFLOW_ID, command.workflowId);
bridgeActionUrl.searchParams.set(HttpQueryKeysEnum.STEP_ID, command.stepId);

return await axios.create().post(url, payload, {
return await axios.create().post(bridgeActionUrl.toString(), payload, {
headers: {
'content-type': 'application/json',
'x-novu-signature': novuSignatureHeader,
Expand Down Expand Up @@ -119,10 +117,7 @@ export class PreviewStep {
};
}

private buildNovuSignature(
environment,
payload: { data: any; inputs: any; controls: any; state: { outputs: any; stepId: string }[] }
) {
private buildNovuSignature(environment, payload: Event) {
const timestamp = Date.now();
const xNovuSignature = `t=${timestamp},v1=${this.createHmacByApiKey(
environment.apiKeys[0].key,
Expand Down
3 changes: 2 additions & 1 deletion apps/api/src/app/step-schemas/usecases/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { GetStepSchema } from './get-step-schema/get-step-schema.usecase';
import { GeneratePreviewUseCase } from './generate-preview/generate-preview-use-case';

export const USE_CASES = [GetStepSchema];
export const USE_CASES = [GetStepSchema, GeneratePreviewUseCase];

0 comments on commit c2e3b39

Please sign in to comment.