Skip to content

Commit

Permalink
fix(api): add missing revenuecat webhook route
Browse files Browse the repository at this point in the history
  • Loading branch information
duongdev committed Sep 23, 2024
1 parent 600347d commit 93bb44d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions apps/api/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ model Budget {
budgetUsers BudgetUser[]
transactions Transaction[]
invitations BudgetUserInvitation[]
settings BudgetSettings @relation(fields: [id], references: [id], onDelete: Cascade)
}

enum BudgetType {
Expand Down Expand Up @@ -112,6 +113,18 @@ enum BudgetPeriodType {
CUSTOM
}

model BudgetSettings {
id String @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
budget Budget?
canMembersCreateTransactions Boolean @default(true)
canMembersViewOtherTransactions Boolean @default(false)
canMembersUpdateOtherTransactions Boolean @default(false)
canMembersDeleteOtherTransactions Boolean @default(false)
}

model BudgetUser {
id String @id @default(cuid())
createdAt DateTime @default(now())
Expand Down
2 changes: 2 additions & 0 deletions apps/api/v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import transactionsApp from './routes/transactions'
import usersApp from './routes/users'
import walletsApp from './routes/wallets'
import clerkWebhooksApp from './routes/webhooks/clerk'
import revenuecatWebhooksApp from './routes/webhooks/revenuecat'

export const hono = new Hono()
.get('/health', (c) => c.text('ok'))
.route('/webhooks/clerk', clerkWebhooksApp)
.route('/webhooks/revenuecat', revenuecatWebhooksApp)

.use('*', authMiddleware)
.route('/auth', authApp)
Expand Down

0 comments on commit 93bb44d

Please sign in to comment.