Skip to content

Commit

Permalink
fix pb: always return success 200
Browse files Browse the repository at this point in the history
  • Loading branch information
ihsangan committed Oct 30, 2024
1 parent 3404322 commit b74d4e0
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/router/pb.ts
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@ export default async function pb(id: string): Promise<Result> {
body
});
const data = await response.json();
return {
success: true,
game: 'Point Blank',
id,
name: data.confirmationFields.username
};
if (data.confirmationFields.username) {
return {
success: true,
game: 'Point Blank',
id,
name: data.confirmationFields.username
};
}
else {
return {
success: false,
message: 'Not found'
}
}
}

0 comments on commit b74d4e0

Please sign in to comment.