Skip to content

Commit

Permalink
Merge pull request #32 from petercort/bug-fix/2
Browse files Browse the repository at this point in the history
updating the typecasting on the webhook ownerid
  • Loading branch information
petercort authored Jan 12, 2025
2 parents 1fcb3be + 5ca8d7b commit 195cfa3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog


### Version 1.3.1

#### bugfix
* PR [#32](https://github.com/petercort/FBF-Buddy/pull/32) - updating the typecasting on the webhook ownerid



### Version 1.3.0

#### chore
Expand Down
2 changes: 1 addition & 1 deletion app.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.0
1.3.1
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fbf-buddy",
"private": true,
"version": "1.3.0",
"version": "1.3.1",
"description": "Cycling event app for Discord",
"main": "app.js",
"engines": {
Expand Down
3 changes: 2 additions & 1 deletion src/strava_webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ app.post('/webhook', async (req, res) => {
const event = req.body;

if (event.object_type === 'activity' && event.aspect_type === 'create') {
const user = await UsersTable.findOne({ where: { strava_user_id: event.owner_id } });
const ownerIdString = event.owner_id.toString();
const user = await UsersTable.findOne({ where: { strava_user_id: ownerIdString } });
if (user) {
const stravaAccessToken = await getStravaAuthentication(user.dataValues)
try {
Expand Down

0 comments on commit 195cfa3

Please sign in to comment.