Skip to content

Instantly share code, notes, and snippets.

@alphamikle
Last active February 11, 2021 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alphamikle/b0f5d444ab4a7ec0e2d4cac9762b1fbd to your computer and use it in GitHub Desktop.
Save alphamikle/b0f5d444ab4a7ec0e2d4cac9762b1fbd to your computer and use it in GitHub Desktop.
// ...
@Post('remittance-with-typeorm-transaction')
@ApiResponse({
type: RemittanceResultDto,
})
async makeRemittanceWithTypeOrmTransaction(@Body() remittanceDto: RemittanceDto) {
return await this.connection.transaction(transactionManager => {
return this.appService.makeRemittanceWithTypeOrmV1(transactionManager, remittanceDto.userIdFrom, remittanceDto.userIdTo, remittanceDto.sum, remittanceDto.withError);
});
}
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment