refactor and restructure pinia store and trpc routers + add members list to account store

This commit is contained in:
Michael Dausmann
2023-04-05 00:28:30 +10:00
parent 10b0d6da3d
commit f2bbe8596a
12 changed files with 214 additions and 119 deletions

View File

@@ -45,6 +45,15 @@ export default class UserAccountService {
});
}
async getAccountMembers(account_id: number): Promise<MembershipWithUser[]> {
return prisma_client.membership.findMany({
where: { account_id },
include: {
user: true
}
});
}
async updateAccountStipeCustomerId (account_id: number, stripe_customer_id: string){
return await prisma_client.account.update({
where: { id: account_id },