Skip to content

Commit 2e4c5e4

Browse files
committed
fix uuid issue
1 parent 99dac8c commit 2e4c5e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/models/project.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Collection, ObjectId } from 'mongodb';
22
import AbstractModel from './abstractModel';
33
import { NotificationsChannelsDBScheme } from '../types/notification-channels';
44
import { ProjectDBScheme } from '@hawk.so/types';
5-
import uuid from 'uuid';
5+
import { v4 as uuid } from 'uuid';
66

77
/**
88
* This structure represents a single rule of notifications settings
@@ -196,7 +196,7 @@ export default class ProjectModel extends AbstractModel<ProjectDBScheme> impleme
196196
* Generates integration ID that's used in collector URL for sending events
197197
*/
198198
public static generateIntegrationId(): string {
199-
return uuid.v4();
199+
return uuid();
200200
}
201201

202202
/**
@@ -205,7 +205,7 @@ export default class ProjectModel extends AbstractModel<ProjectDBScheme> impleme
205205
* @param integrationId - integration id for using in collector URL
206206
*/
207207
public static generateIntegrationToken(integrationId: string): string {
208-
const secret = uuid.v4();
208+
const secret = uuid();
209209

210210
const decodedIntegrationToken = {
211211
integrationId,

0 commit comments

Comments
 (0)