Created
September 6, 2022 21:00
-
-
Save gabrielbmoro/6099c073e22610c07eded0270326bd2b to your computer and use it in GitHub Desktop.
An API Project - Gists Part 4
This file contains hidden or 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
@injectable() | |
class CreateNewHistoricEntryUseCase { | |
constructor( | |
@inject("ISisOrgRepository") | |
private sisOrgRepository: ISisOrgRepository | |
) { | |
} | |
async execute(request: IRequest): Promise<IHistoricEntry[]> { | |
const historicEntries: IHistoricEntry[] = []; | |
... | |
await this.sisOrgRepository.createHistoricEntry(historicEntries); | |
return historicEntries; | |
} | |
} | |
export { CreateNewHistoricEntryUseCase }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment