feat(server): rename contributionTier → contributionAmount in routes + utils
This commit is contained in:
parent
7a2acd4628
commit
57f5152be4
18 changed files with 35 additions and 35 deletions
|
|
@ -43,9 +43,9 @@ export default defineEventHandler(async (event) => {
|
|||
pronouns: body.pronouns || undefined,
|
||||
location: body.location || undefined,
|
||||
circle: body.circle,
|
||||
contributionTier: body.contributionTier,
|
||||
contributionAmount: body.contributionAmount,
|
||||
bio: body.motivation || undefined,
|
||||
status: body.contributionTier === '0' ? 'active' : 'pending_payment',
|
||||
status: body.contributionAmount === 0 ? 'active' : 'pending_payment',
|
||||
agreement: { acceptedAt: new Date() },
|
||||
})
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ export default defineEventHandler(async (event) => {
|
|||
})
|
||||
|
||||
// For free tier, issue session and redirect to welcome
|
||||
if (body.contributionTier === '0') {
|
||||
if (body.contributionAmount === 0) {
|
||||
const sessionToken = jwt.sign(
|
||||
{ memberId: member._id, email: member.email, tv: member.tokenVersion },
|
||||
config.jwtSecret,
|
||||
|
|
@ -90,7 +90,7 @@ export default defineEventHandler(async (event) => {
|
|||
email: member.email,
|
||||
name: member.name,
|
||||
circle: member.circle,
|
||||
contributionTier: member.contributionTier,
|
||||
contributionAmount: member.contributionAmount,
|
||||
status: member.status,
|
||||
}
|
||||
}
|
||||
|
|
@ -105,7 +105,7 @@ export default defineEventHandler(async (event) => {
|
|||
email: member.email,
|
||||
name: member.name,
|
||||
circle: member.circle,
|
||||
contributionTier: member.contributionTier,
|
||||
contributionAmount: member.contributionAmount,
|
||||
status: member.status,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue