Skip to content

Commit 62b2b2d

Browse files
committed
Squashed commit of the following:
commit a436fe6 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 22:09:42 2022 -0500 Fixed Null issue for submit btn commit eebf120 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 22:06:18 2022 -0500 Clean up Console Logs and added error for password change commit 27a234f Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 21:59:03 2022 -0500 Doesn't matter if it's ugly it works commit f9a13e0 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 21:55:30 2022 -0500 possibly fix commit 86beea1 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 21:51:16 2022 -0500 alright that worked, now trying through the method with await commit 5e3462a Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 21:46:47 2022 -0500 cut out the middle man commit 6302b1b Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 21:27:48 2022 -0500 if this works wtf commit 61b0a56 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 21:21:55 2022 -0500 problem identified - send request not waiting for completion commit 290076f Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 21:19:17 2022 -0500 take a peeksy commit 20d1614 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 21:10:21 2022 -0500 silly billy boy commit c96ff9d Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 21:08:50 2022 -0500 am i not waiting commit 938c4b3 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 21:06:51 2022 -0500 maybe commit af7027f Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 20:59:18 2022 -0500 random guess commit f4c8d24 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 20:52:15 2022 -0500 idk man just work commit 8765785 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 20:46:09 2022 -0500 try to fix and cry commit 889d418 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 20:41:13 2022 -0500 const commit ccc378c Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 20:38:54 2022 -0500 trying commit c2ee202 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 20:18:54 2022 -0500 fixed, now testing commit 050cea0 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 20:15:57 2022 -0500 fix 3 commit 71c03ae Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 20:13:29 2022 -0500 fix attempt 2 commit 415551d Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 20:09:34 2022 -0500 debug detect changes commit 89f48a6 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 20:07:43 2022 -0500 convert to array commit 99889cd Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 20:02:39 2022 -0500 fix to form undefined commit e6656b7 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 20:00:00 2022 -0500 fix to localstorage access commit 6c541f6 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 19:56:38 2022 -0500 fix async commit b2f6695 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 19:54:21 2022 -0500 Detect Changes in Account to enable submit commit 90b4de6 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 19:34:45 2022 -0500 Fix to user profile updating ui commit 21bb99e Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 19:14:26 2022 -0500 attempt to fix bearer token commit a521c33 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 17:41:23 2022 -0500 should fix api endpoint commit 5aae830 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 17:38:50 2022 -0500 trying to fix api endpoint submit commit 53b2b80 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 17:33:55 2022 -0500 Cleaned Console Logs, updated request send commit dd27807 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 17:21:43 2022 -0500 typo fix commit 6f2b4d7 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 17:13:07 2022 -0500 Updates to message displaying commit 1bdad25 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 16:51:10 2022 -0500 fix enum commit ecd7514 Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 16:43:12 2022 -0500 Updated to js commit 698214c Author: Kevin Gerstner <sirkevinicus@gmail.com> Date: Sun Aug 21 16:36:43 2022 -0500 Email Change mostly working
1 parent 25bebc2 commit 62b2b2d

File tree

4 files changed

+420
-231
lines changed

4 files changed

+420
-231
lines changed

functions/src/stripeFunctions.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const stripe = new Stripe(process.env.STRIPE_KEY!, {
1717
apiVersion: "2020-08-27",
1818
});
1919

20-
const DOMAIN = "https://civilmedia.webflow.io";
20+
const DOMAIN = "https://civilmedia.io";
2121

2222
/**
2323
* The Stripe webhook that handles response to checkout events
@@ -141,7 +141,6 @@ async function handleSubscriptionCreated(event) {
141141

142142
async function handleSubscriptionUpdated(event) {
143143
const eventData = event.data.object;
144-
console.log(eventData);
145144
const customerData = await getCustomerData(eventData.customer);
146145
const uid = await getUserIDByCustomerID(eventData.customer);
147146
if (!uid) {
@@ -161,9 +160,8 @@ async function handleSubscriptionUpdated(event) {
161160
})
162161
);
163162
}
164-
}
165-
// If cancel_at_period_end is false and active is false, the subscription was previously cancelled
166-
else {
163+
} else {
164+
// If cancel_at_period_end is false and active is false, the subscription was previously cancelled
167165
if (customerData && customerData.active === false) {
168166
updateCustomer(eventData.customer, { active: true });
169167
await slackSubscriptionRenewedNotification(

functions/src/userFunctions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ router.post("/profile/:uid", checkIfAuthenticated, async (req, res) => {
6464
})
6565
.then((result) => {
6666
console.log("Success: Updated user information", result);
67-
return null;
67+
res.status(200).send("Updated profile successfully");
6868
})
6969
.catch((err) => {
7070
console.log("Could not update user's information", err);
71-
return null;
71+
res.status(400).send("Could not update profile.");
7272
});
7373
});
7474

scripts/pages/account.html

Lines changed: 0 additions & 224 deletions
This file was deleted.

0 commit comments

Comments
 (0)