Skip to content

Commit

Permalink
Merge pull request #791 from bounswe/be-790/my-followings-poll-bugfix
Browse files Browse the repository at this point in the history
my followings done
  • Loading branch information
BatuhanIlhan authored Dec 25, 2023
2 parents 7db33fa + fd8b203 commit 4df11a3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions app/backend/src/poll/poll.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,32 @@ export class PollController {
});
}

@UseGuards(AuthGuard, VerificationGuard)
@ApiResponse({
status: 200,
description: 'Polls are fetched successfully.',
type: [GetPollResponseDto],
})
@ApiResponse({
status: 500,
description: 'Internal server error, contact with backend team.',
})
@Get('my-followings2')
public async findPollsOfUsersIFollow2(@Req() req: any): Promise<any> {
const userId = req.user.id;
return await this.pollService.findAll({
creatorId: null,
approveStatus: true,
likedById: null,
votedById: null,
followedById: userId,
sortString: null,
is_settled: null,
tags: null,
userId,
});
}

@UseGuards(AuthGuard, VerificationGuard)
@ApiQuery({ name: 'pageSize', required: true })
@ApiQuery({ name: 'pageNum', required: true })
Expand Down

0 comments on commit 4df11a3

Please sign in to comment.