Skip to content

Commit

Permalink
Document investor list endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Jun 18, 2024
1 parent dec7311 commit d8389ef
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/routes/v1/vault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,22 @@ export default async function (
.prop('chain', chainSchema.required().description('The chain the vault is on'))
.prop('vault_address', addressSchema.required().description('The vault contract address'));

const responseSchema = S.array().items(S.object());
const responseSchema = S.array().items(
S.object()
.prop('investor_address', addressSchema.required().description('The investor address'))
.prop('total_shares_balance', S.string().required().description('The total shares balance'))
.prop('underlying_balance0', S.string().required().description('The underlying balance 0'))
.prop('underlying_balance1', S.string().required().description('The underlying balance 1'))
.prop('usd_balance0', S.string().required().description('The USD balance 0'))
.prop('usd_balance1', S.string().required().description('The USD balance 1'))
.prop('usd_balance', S.string().required().description('The USD balance'))
);

const schema: FastifySchema = {
tags: ['vault'],
params: urlParamsSchema,
summary: 'Get all investor positions for a vault',
description: 'Get all investor positions for a vault',
response: {
200: responseSchema,
},
Expand Down

0 comments on commit d8389ef

Please sign in to comment.