chore: fix ContentType usage (#2353)

* chore: fix ContentType usage

* chore: fix specs
This commit is contained in:
Karol Sójko
2023-07-12 13:53:29 +02:00
committed by GitHub
parent d057cdff84
commit 325737bfbd
247 changed files with 1092 additions and 1060 deletions

View File

@@ -1,4 +1,3 @@
import { ContentType } from '@standardnotes/common'
import { Copy, extendArray, UuidGenerator, Uuids } from '@standardnotes/utils'
import { SNLog } from '../../Log'
import { isErrorDecryptingParameters, SNRootKey } from '@standardnotes/encryption'
@@ -20,6 +19,7 @@ import {
LocalStorageEncryptedContextualPayload,
FullyFormedTransferPayload,
} from '@standardnotes/models'
import { ContentType } from '@standardnotes/domain-core'
/**
* The storage service is responsible for persistence of both simple key-values, and payload
@@ -140,7 +140,7 @@ export class DiskStorageService extends Services.AbstractService implements Serv
const payload = new EncryptedPayload({
...wrappedValue,
...PayloadTimestampDefaults(),
content_type: ContentType.EncryptedStorage,
content_type: ContentType.TYPES.EncryptedStorage,
})
const split: Encryption.KeyedDecryptionSplit = key
@@ -232,7 +232,7 @@ export class DiskStorageService extends Services.AbstractService implements Serv
const payload = new DecryptedPayload({
uuid: UuidGenerator.GenerateUuid(),
content: valuesToWrap as unknown as ItemContent,
content_type: ContentType.EncryptedStorage,
content_type: ContentType.TYPES.EncryptedStorage,
...PayloadTimestampDefaults(),
})