fix: declared return type on getExchangeRate

pull/8/head
Inga 🏳‍🌈 11 months ago
parent 296fdb4945
commit dd5c719345
  1. 4
      src/transaction/transaction.controller.ts

@ -1,5 +1,5 @@
import { Controller, Post, UsePipes, Body } from '@nestjs/common';
import { ExchangeRateInput } from 'src/exchange-rate/exchange-rate.dto';
import { ExchangeRateInput, ExchangeRateResponse } from 'src/exchange-rate/exchange-rate.dto';
import { ExchangeRateService } from 'src/exchange-rate/exchange-rate.service';
import { TransactionService } from './transaction.service';
import { transactionBodySchema } from './transaction.validation';
@ -112,7 +112,7 @@ export class TransactionController {
}
getExchangeRate(exchangeRateInput: ExchangeRateInput) {
return new Promise((resolve, reject) => {
return new Promise<ExchangeRateResponse>((resolve, reject) => {
try {
this.exchangeRateService.convertCurrency(exchangeRateInput).subscribe({
next: resolve,

Loading…
Cancel
Save