We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11039e2 commit 5c216ddCopy full SHA for 5c216dd
src/common/models/identifier/identifier.dto.ts
@@ -1,12 +1,12 @@
1
import { IsString } from 'class-validator';
2
-import { v4 as uuid } from 'uuid';
+import { randomUUID } from 'crypto';
3
4
export class IdentifierDto {
5
@IsString()
6
private readonly uuid: string;
7
8
constructor(id?: unknown) {
9
- this.uuid = id ? id.toString() : uuid(); // '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
+ this.uuid = id ? id.toString() : randomUUID(); // '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
10
}
11
12
toString() {
0 commit comments