Skip to content

Commit

Permalink
feat(api): add createBudgetUser service (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
duongdev committed Jun 8, 2024
1 parent ce61c51 commit 10b0e3d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions apps/api/v1/services/budget.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,21 @@ export async function findBudgetsOfUser({
},
})
}

export async function createBudgetUser({
userId,
budgetId,
permission,
}: {
userId: string
budgetId: string
permission: BudgetUserPermission
}) {
return prisma.budgetUser.create({
data: {
userId,
budgetId,
permission,
},
})
}

0 comments on commit 10b0e3d

Please sign in to comment.