Skip to content

Commit

Permalink
user points
Browse files Browse the repository at this point in the history
  • Loading branch information
suraj-tekdi committed Jan 14, 2025
1 parent ebb82a5 commit 8e2cd97
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/adapters/hasura/altProgramAssociation.adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1282,10 +1282,17 @@ export class ALTProgramAssociationService {
try {
const response = await this.axios(config_data);
console.log("checkResponse", response.data);
if(response.data.errors){
return new SuccessResponse({
statusCode: 400,
message: response.data.errors[0].message,
data: response.data.errors,
});
}
const points = response.data.data.UserPoints;
const totalCount = response.data.data.total.aggregate.count;
const totalPages = Math.ceil(totalCount / limit);
if (response) {
if (points.length>0) {
return new SuccessResponse({
statusCode: 200,
message: "User Points fetched successfully.",
Expand Down

0 comments on commit 8e2cd97

Please sign in to comment.