Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): add missing revenuecat webhook route #379

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading