fix(activity): cadence-aware suffixes on contribution log entries
This commit is contained in:
parent
10f8cab6e3
commit
e5f1e9f95e
3 changed files with 17 additions and 11 deletions
|
|
@ -36,7 +36,7 @@ export default defineEventHandler(async (event) => {
|
|||
const isFirstActivation = preMember?.status === 'pending_payment'
|
||||
const member = await Member.findById(preMember._id)
|
||||
|
||||
logActivity(member._id, 'subscription_created', { amount: body.contributionAmount })
|
||||
logActivity(member._id, 'subscription_created', { amount: body.contributionAmount, cadence: body.cadence })
|
||||
|
||||
await autoFlagPreExistingSlackAccess(member)
|
||||
try {
|
||||
|
|
@ -134,7 +134,7 @@ export default defineEventHandler(async (event) => {
|
|||
const isFirstActivation = preMember?.status === 'pending_payment'
|
||||
const member = await Member.findById(preMember._id)
|
||||
|
||||
logActivity(member._id, 'subscription_created', { amount: body.contributionAmount })
|
||||
logActivity(member._id, 'subscription_created', { amount: body.contributionAmount, cadence: body.cadence })
|
||||
|
||||
try {
|
||||
const txs = await listHelcimCustomerTransactions(body.customerCode)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export default defineEventHandler(async (event) => {
|
|||
|
||||
// Log contribution change (fire-and-forget, at the top so it logs regardless of which case path executes)
|
||||
const logContributionChange = () => {
|
||||
logActivity(member._id, 'contribution_changed', { from: oldAmount, to: newAmount })
|
||||
logActivity(member._id, 'contribution_changed', { from: oldAmount, to: newAmount, cadence: body.cadence })
|
||||
}
|
||||
|
||||
const oldRequiresPayment = requiresPayment(oldAmount);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue