Skip to content

Commit

Permalink
Merge pull request #117 from rogershi-dev/feature/registration-auth
Browse files Browse the repository at this point in the history
Used await to properly handle the promise returned by pool.query() fu…
  • Loading branch information
rogershi-dev authored Jul 14, 2024
2 parents 783b77e + d887243 commit b72afa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ router.post('/webhook', async (req, res) => {
console.log('Mastodon Post Url: ', mastodonPostUrl);

try {
const [rows, fields] = pool.query(`SELECT * FROM users WHERE github_username = ?`, [githubUsername]);
const [rows, fields] = await pool.query(`SELECT * FROM users WHERE github_username = ?`, [githubUsername]);
if (rows.length > 0){
// Retrieve the linkedin-access-token
const linkedinAccessToken = rows[0].linkedin_token;
Expand Down

0 comments on commit b72afa3

Please sign in to comment.