-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove object loading by id and key (#281)
* refactor: update anonymous tokens * refactor: update files * refactor: update templates * refactor: update tokens * chore: update schemas * fix: tests * fix: tests * fix: test * chore: remove secretKey's from DTOs * chore: remove whole describe block * chore: move tests instead of deleting them --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
85db57a
commit fd91803
Showing
18 changed files
with
33 additions
and
642 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 4 additions & 16 deletions
20
packages/runtime/src/extensibility/facades/anonymous/AnonymousTokensFacade.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,12 @@ | ||
import { ApplicationError, Result } from "@js-soft/ts-utils"; | ||
import { Inject } from "typescript-ioc"; | ||
import { TokenDTO } from "../../../types"; | ||
import { | ||
LoadPeerTokenAnonymousByIdAndKeyRequest, | ||
LoadPeerTokenAnonymousByIdAndKeyUseCase, | ||
LoadPeerTokenAnonymousByTruncatedReferenceRequest, | ||
LoadPeerTokenAnonymousByTruncatedReferenceUseCase | ||
} from "../../../useCases"; | ||
import { LoadPeerTokenAnonymousRequest, LoadPeerTokenAnonymousUseCase } from "../../../useCases"; | ||
|
||
export class AnonymousTokensFacade { | ||
public constructor( | ||
@Inject private readonly loadPeerTokenByTruncatedReferenceUseCase: LoadPeerTokenAnonymousByTruncatedReferenceUseCase, | ||
@Inject private readonly loadPeerTokenByIdAndKeyUseCase: LoadPeerTokenAnonymousByIdAndKeyUseCase | ||
) {} | ||
public constructor(@Inject private readonly loadPeerTokenUseCase: LoadPeerTokenAnonymousUseCase) {} | ||
|
||
public async loadPeerTokenByTruncatedReference(request: LoadPeerTokenAnonymousByTruncatedReferenceRequest): Promise<Result<TokenDTO, ApplicationError>> { | ||
return await this.loadPeerTokenByTruncatedReferenceUseCase.execute(request); | ||
} | ||
|
||
public async loadPeerTokenByIdAndKey(request: LoadPeerTokenAnonymousByIdAndKeyRequest): Promise<Result<TokenDTO, ApplicationError>> { | ||
return await this.loadPeerTokenByIdAndKeyUseCase.execute(request); | ||
public async loadPeerToken(request: LoadPeerTokenAnonymousRequest): Promise<Result<TokenDTO, ApplicationError>> { | ||
return await this.loadPeerTokenUseCase.execute(request); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
packages/runtime/src/useCases/anonymous/tokens/LoadPeerTokenAnonymousByIdAndKey.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export * from "./LoadPeerTokenAnonymousByIdAndKey"; | ||
export * from "./LoadPeerTokenAnonymousByTruncatedReference"; | ||
export * from "./LoadPeerTokenAnonymous"; |
Oops, something went wrong.