From 116e2e54b1e686f9b446f37c3a7d78c03139633d Mon Sep 17 00:00:00 2001 From: Oleg Kalenik Date: Mon, 17 Jan 2022 16:23:48 +0200 Subject: [PATCH] *added dao tvl api endpoint --- apps/api/src/tvl/tvl.controller.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/apps/api/src/tvl/tvl.controller.ts b/apps/api/src/tvl/tvl.controller.ts index 1a868b8..f29142a 100644 --- a/apps/api/src/tvl/tvl.controller.ts +++ b/apps/api/src/tvl/tvl.controller.ts @@ -121,6 +121,22 @@ export class TvlController { return this.tvlService.daoTotals(context); } + @ApiResponse({ + status: 200, + type: MetricResponse, + }) + @ApiBadRequestResponse({ + description: 'Bad Request Response based on the query params set', + }) + @HasDaoContractContext() + @Get('/:dao/tvl') + async daoTvl( + @Param(ContractContextPipe) context: DaoContractContext, + @Query(MetricQueryPipe) metricQuery: MetricQuery, + ): Promise { + return this.tvlService.tvl(context, metricQuery); + } + @ApiResponse({ status: 200, type: MetricResponse,