Files
standardnotes-server/packages/syncing-server/src/Domain/KeySystem/KeySystemAssociation.ts
T
Karol SójkoandGitHub 34085ac6fb feat: consider shared vault owner quota when uploading files to shared vault (#704)
* fix(auth): updating storage quota on shared subscriptions

* fix(syncing-server): turn shared vault and key associations into value objects

* feat: consider shared vault owner quota when uploading files to shared vault

* fix: add passing x-shared-vault-owner-context value

* fix: refactor creating cross service token to not throw errors

* fix: caching cross service token

* fix: missing header in http service proxy
2023-08-22 10:49:58 +02:00

19 lines
688 B
TypeScript

import { Result, Validator, ValueObject } from '@standardnotes/domain-core'
import { KeySystemAssociationProps } from './KeySystemAssocationProps'
export class KeySystemAssociation extends ValueObject<KeySystemAssociationProps> {
private constructor(props: KeySystemAssociationProps) {
super(props)
}
static create(keySystemIdentifier: string): Result<KeySystemAssociation> {
const validationResult = Validator.isNotEmptyString(keySystemIdentifier)
if (validationResult.isFailed()) {
return Result.fail<KeySystemAssociation>(validationResult.getError())
}
return Result.ok<KeySystemAssociation>(new KeySystemAssociation({ keySystemIdentifier }))
}
}