fix(referral): convert BigInt to string for JSON serialization
BigInt cannot be serialized by JSON.stringify, convert to string before returning from the API endpoint. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
1afdc2ce17
commit
9a823e8871
|
|
@ -123,7 +123,7 @@ export class ReferralController {
|
||||||
})
|
})
|
||||||
async getReferralChainForReward(
|
async getReferralChainForReward(
|
||||||
@Param('userId') userId: string,
|
@Param('userId') userId: string,
|
||||||
): Promise<{ ancestors: Array<{ userId: bigint; hasPlanted: boolean }> }> {
|
): Promise<{ ancestors: Array<{ userId: string; hasPlanted: boolean }> }> {
|
||||||
const userIdBigInt = BigInt(userId);
|
const userIdBigInt = BigInt(userId);
|
||||||
|
|
||||||
// 获取用户的推荐关系
|
// 获取用户的推荐关系
|
||||||
|
|
@ -140,7 +140,7 @@ export class ReferralController {
|
||||||
return {
|
return {
|
||||||
ancestors: [
|
ancestors: [
|
||||||
{
|
{
|
||||||
userId: referrerId,
|
userId: referrerId.toString(),
|
||||||
hasPlanted,
|
hasPlanted,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue