MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / disableAutoTopup

Function disableAutoTopup

packages/billing/src/auto-topup.ts:128–140  ·  view source on GitHub ↗
(params: {
  userId: string
  reason: string
  logger: Logger
})

Source from the content-addressed store, hash-verified

126}
127
128async function disableAutoTopup(params: {
129 userId: string
130 reason: string
131 logger: Logger
132}) {
133 const { userId, reason, logger } = params
134 await db
135 .update(schema.user)
136 .set({ auto_topup_enabled: false })
137 .where(eq(schema.user.id, userId))
138
139 logger.info({ userId, reason }, 'Disabled auto top-up')
140}
141
142async function processAutoTopupPayment(params: {
143 userId: string

Callers 2

validateAutoTopupStatusFunction · 0.85
checkAndTriggerAutoTopupFunction · 0.85

Calls 1

setMethod · 0.80

Tested by

no test coverage detected