Skip to content

Commit

Permalink
chore: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheeg committed Aug 11, 2024
1 parent 4d184ca commit f1bd664
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion daos/ScoreDAO.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ class ScoreDAO {
const result = await dbPool.query(
`
SELECT s.*, u.login, u.display_name, u.profile_image_url, u.country_code
FROM scores s, twitch_users u
FROM scores s, users u
WHERE s.player_id=u.id
AND s.id=$1
`,
Expand Down
4 changes: 1 addition & 3 deletions daos/UserDAO.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class UserDAO {
}

async createUser(user_data, options) {
console.log('createUser', user_data, options);
// console.log('createUser', user_data, options);

// TODO: wrap all the queries here in a transaction

Expand Down Expand Up @@ -97,8 +97,6 @@ class UserDAO {
[user_data.email.toLowerCase()]
);

console.log(res.rows);

if (res.rows.length === 1) {
console.log(`Found one matching user`);
// verify that user is not already linked to an identity from the same provider.
Expand Down
2 changes: 1 addition & 1 deletion routes/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ router.get('/twitch/callback', async (req, res) => {
}
);

console.log({ data: user_data_response.body.data });
// console.log({ data: user_data_response.body.data });

const user_object = user_data_response.body.data[0];

Expand Down
2 changes: 1 addition & 1 deletion routes/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ router.post('/update_profile', express.json(), async (req, res) => {
await UserDAO.updateProfile(req.session.user.id, update);
res.status(200).json({});
} catch (err) {
if (/violates.*twitch_users_login_key/.test(err.message)) {
if (/violates.*users_login_key/.test(err.message)) {
errors.push(
`URL ID "${req.body.login}" is already in use - pick another ID`
);
Expand Down

0 comments on commit f1bd664

Please sign in to comment.