Skip to content

Commit

Permalink
fix: endpoints don't return data (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
martiliones authored Jul 15, 2024
1 parent 7e580c6 commit b13fe2d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/rates/rates.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,21 @@ export class RatesController {

@Get('get')
@UsePipes(new ZodValidationPipe(getRatesSchema))
getRates(
async getRates(
@Query()
query: GetRatesDto,
) {
const result = this.ratesService.getTickers(query.coin, query.rateLifetime);
const result = await this.ratesService.getTickers(
query.coin,
query.rateLifetime,
);
return { result };
}

@Get('getHistory')
@UsePipes(new ZodValidationPipe(getHistorySchema))
getHistory(@Query() query: GetHistoryDto) {
const result = this.ratesService.getHistoryTickers(query);
async getHistory(@Query() query: GetHistoryDto) {
const result = await this.ratesService.getHistoryTickers(query);
return { result };
}

Expand Down

0 comments on commit b13fe2d

Please sign in to comment.