Skip to content

Commit

Permalink
Merge pull request #5 from near-daos/feature/dao_tvl
Browse files Browse the repository at this point in the history
Added dao tvl api endpoint
  • Loading branch information
okalenyk authored Jan 17, 2022
2 parents 97d0456 + 116e2e5 commit 1450977
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions apps/api/src/tvl/tvl.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<MetricResponse> {
return this.tvlService.tvl(context, metricQuery);
}

@ApiResponse({
status: 200,
type: MetricResponse,
Expand Down

0 comments on commit 1450977

Please sign in to comment.