Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src/vault: Include campaign data and sum of succeeded withdraws to vault's response #584

Merged
merged 3 commits into from
Dec 14, 2023

Conversation

sashko9807
Copy link
Member

Needed for better front-end visualization

Copy link

github-actions bot commented Dec 12, 2023

✅ Tests will run for this PR. Once they succeed it can be merged.

@slavcho slavcho added the run tests Allows running the tests workflows for forked repos label Dec 13, 2023
@github-actions github-actions bot removed the run tests Allows running the tests workflows for forked repos label Dec 13, 2023
@@ -25,8 +31,33 @@ export class VaultService {
return await this.prisma.vault.create({ data: createVaultDto.toEntity() })
}

async findAll(): Promise<Vault[]> {
return await this.prisma.vault.findMany()
async findAll(): Promise<VaultWithWithdrawalSum[]> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow! That is some SQL magic!

@slavcho slavcho merged commit 226193d into podkrepi-bg:master Dec 14, 2023
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants