Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
fix: small code fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwwinter committed Feb 19, 2024
1 parent 5725bc7 commit 94e1cd9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/notification/controller/dtos.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Reference } from '../../domain/reference';

export interface WebhookDto {
id: string;
name: string;
Expand All @@ -6,6 +8,7 @@ export interface WebhookDto {
url: string;
};
authenticationType: 'API_KEY';
reportSubscriptions: Reference[];
}

export interface CreateWebhookDto {
Expand All @@ -14,13 +17,10 @@ export interface CreateWebhookDto {
method: 'GET' | 'POST';
url: string;
};
authentication: {
type: 'API_KEY';
apiKey: string;
};
authentication: ApiKeyAuthConfig;
}

export interface ApiKeyAuthConfig {
key: string;
headerName: string;
type: 'API_KEY';
apiKey: string;
}
1 change: 1 addition & 0 deletions src/notification/controller/webhook.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export class WebhookController {
name: webhook.label,
target: webhook.target,
authenticationType: webhook.authentication.type,
reportSubscriptions: webhook.reportSubscriptions,
};
}
}
2 changes: 1 addition & 1 deletion src/notification/storage/webhook-storage.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class WebhookStorage {
},
owner: {
type: 'USER',
id: 'todo-user-id-here',
id: 'todo-user-id-here', // todo
},
reportSubscriptions: [],
})
Expand Down

0 comments on commit 94e1cd9

Please sign in to comment.