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

Function endUserSession

web/src/server/free-session/public-api.ts:623–640  ·  view source on GitHub ↗
(params: {
  userId: string
  userEmail?: string | null | undefined
  deps?: SessionDeps
})

Source from the content-addressed store, hash-verified

621}
622
623export async function endUserSession(params: {
624 userId: string
625 userEmail?: string | null | undefined
626 deps?: SessionDeps
627}): Promise<void> {
628 const deps = params.deps ?? defaultDeps
629 if (
630 !deps.isWaitingRoomEnabled() ||
631 isWaitingRoomBypassedForEmail(params.userEmail)
632 ) {
633 return
634 }
635 await deps.endSession({
636 userId: params.userId,
637 now: nowOf(deps),
638 sessionLengthMs: deps.sessionLengthMs,
639 })
640}
641
642export type SessionGateResult =
643 | { ok: true; reason: 'disabled' }

Callers 3

endSessionForHardBlockFunction · 0.90
deleteFreebuffSessionFunction · 0.90
public-api.test.tsFile · 0.90

Calls 2

nowOfFunction · 0.85

Tested by

no test coverage detected