chore: fix uuid generation for importers
This commit is contained in:
12
packages/services/src/Domain/UseCase/GenerateUuid.ts
Normal file
12
packages/services/src/Domain/UseCase/GenerateUuid.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Result, SyncUseCaseInterface } from '@standardnotes/domain-core'
|
||||
import { PureCryptoInterface } from '@standardnotes/sncrypto-common'
|
||||
|
||||
export class GenerateUuid implements SyncUseCaseInterface<string> {
|
||||
constructor(private crypto: PureCryptoInterface) {}
|
||||
|
||||
execute(): Result<string> {
|
||||
const uuid = this.crypto.generateUUID()
|
||||
|
||||
return Result.ok(uuid)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user