Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
🐛 Fix stripe customer ID key
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Sep 8, 2020
1 parent 1e040a7 commit 87c9b13
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/_staart/rest/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,21 @@ export const updateGroupBillingForUser = async (
result = await createCustomer(
groupId,
data,
async (groupId: number, data: { stripeCustomer: string }) => {
async (groupId: number, data: { stripeCustomerId: string }) => {
const attributes =
typeof group.attributes === "object" ? group.attributes : {};
return prisma.groups.update({
where: { id: groupId },
data: { attributes: { ...attributes, ...data } },
data: {
attributes: {
...attributes,
stripeCustomer: data.stripeCustomerId,
},
},
});
}
);
console.log(result);
}
queueWebhook(groupId, Webhooks.UPDATE_ORGANIZATION_BILLING, data);
trackEvent({ groupId, type: Webhooks.UPDATE_ORGANIZATION_BILLING }, locals);
Expand Down

0 comments on commit 87c9b13

Please sign in to comment.