Skip to content

Commit

Permalink
Done
Browse files Browse the repository at this point in the history
  • Loading branch information
philipperolet committed Nov 20, 2023
1 parent 08500ec commit 6d7b8d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions front/lib/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export async function sendEmail(email: string, message: any) {
);
} catch (error) {
logger.error(
{ error, email },
"Error sending email to admin about subscription cancellation."
{ error, email, subject: message.subject },
"Error sending email."
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions front/pages/api/stripe/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ async function handler(
status: "ended",
endDate: new Date(),
});
await revokeUsersForDowngrade(activeSubscription.workspace.sId);
await revokeUsersForDowngrade(activeSubscription.workspace.id);
await sendOpsEmail(activeSubscription.workspace.sId);
} else {
logger.warn(
Expand Down Expand Up @@ -399,7 +399,7 @@ async function handler(
* Remove everybody except the most tenured admin
* @param workspaceId
*/
async function revokeUsersForDowngrade(workspaceId: string) {
async function revokeUsersForDowngrade(workspaceId: number) {
const memberships = await Membership.findAll({
where: { workspaceId },
order: [["createdAt", "ASC"]],
Expand Down

0 comments on commit 6d7b8d8

Please sign in to comment.