Skip to content

Commit

Permalink
Cast email to lower case for tier check in setUserInfo()
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakeyzer committed Sep 17, 2022
1 parent c05e1bd commit 27bd92e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.5.1",
"version": "2.5.2",
"name": "harmless_key",
"description": "A Dungeons and Dragons Combat Tracker",
"productName": "Harmless Key",
Expand Down
6 changes: 3 additions & 3 deletions src/store/modules/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ const user_actions = {
},
async setUserInfo({ commit, dispatch, rootGetters }) {
if(rootGetters.user) {
const user = await users_ref.child(rootGetters.user.uid)
const user = users_ref.child(rootGetters.user.uid);
user.on("value", async user_snapshot => {
const user_info = user_snapshot.val();

if(user_info) {
//Fetch patron info with email
const email = (user_info.patreon_email) ? user_info.patreon_email : user_info.email;
const email = (user_info.patreon_email) ? user_info.patreon_email.toLowerCase() : user_info.email.toLowerCase();

// User always basic reward tier
let path = `tiers/basic`;

// Use firebise serverTimeOffset to get the date from the server and not the client.
// Use firebase serverTimeOffset to get the date from the server and not the client.
// https://firebase.google.com/docs/database/web/offline-capabilities#clock-skew
let time_ms = 0
await db.ref("/.info/serverTimeOffset")
Expand Down

0 comments on commit 27bd92e

Please sign in to comment.