update billing types

This commit is contained in:
Ramnique Singh 2025-08-23 09:59:14 +05:30
parent 219d4c7901
commit b49e14fdf8
9 changed files with 37 additions and 26 deletions

View file

@ -165,6 +165,7 @@ export class RunConversationTurnUseCase implements IRunConversationTurnUseCase {
}
} finally {
// Log billing usage
console.log('finally logging billing usage');
if (USE_BILLING && billingCustomerId) {
await logUsage(billingCustomerId, {
items: usageTracker.flush(),

View file

@ -65,7 +65,7 @@ export class CreateProjectUseCase implements ICreateProjectUseCase {
}
// validate enough credits
const result = await authorize(customer._id, {
const result = await authorize(customer.id, {
type: "create_project",
data: {
existingProjectCount: count,