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 49b45ec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
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
4 changes: 3 additions & 1 deletion 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', clerkWebhooksApp)
.route('/webhooks/revenuecat', revenuecatWebhooksApp)

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

0 comments on commit 49b45ec

Please sign in to comment.