Skip to content

Commit

Permalink
use wishes campaignId param (#528)
Browse files Browse the repository at this point in the history
  • Loading branch information
tongo-angelov committed Aug 6, 2023
1 parent 1e7c2ec commit b77aa01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/api/src/donation-wish/donation-wish.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export class DonationWishController {
@Get('list/:campaignId')
@Public()
@DonationWishQueryDecorator()
findList(@Query() query?: DonationQueryDto) {
findList(@Param('campaignId') campaignId: string, @Query() query?: DonationQueryDto) {
return this.donationWishService.findWishesByCampaignId(
query?.campaignId,
campaignId,
query?.minAmount,
query?.maxAmount,
query?.from,
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/donation-wish/donation-wish.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class DonationWishService {
orderBy: [sortBy ? { [sortBy]: sortOrder ? sortOrder : 'desc' } : { createdAt: 'desc' }],
include: {
person: { select: { id: true, firstName: true, lastName: true } },
donation: { select: { amount: true } },
donation: { select: { amount: true, currency: true } },
},
})

Expand Down

0 comments on commit b77aa01

Please sign in to comment.