diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f7eb91..ad3481d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # Changelog +### Version 1.3.0 + +#### chore +* PR [#31](https://github.com/petercort/FBF-Buddy/pull/31) - updating the webhook with more verboseness + + + ### Version 1.2.1 #### bugfix diff --git a/README.md b/README.md index c7cfa30..5bfd290 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,15 @@ Changes should be made to the readme-template.yml file and the generate-readme.j A discord app that helps with random tasks in the FBF discord! +| Command | Inputs | Description | Example | Output | +| ------- | ------ | ----------- | ------- | ------ | +| /connect_strava | None | User authorizes access to the Strava app to collect information about your bikes. Permissions: scope=read, activity:read_all, profile:read_all | /connect_strava | A link to connect to Strava | +| /sync_bikes | None | Syncs bike data from Strava. | /sync_bikes | Returns bike data in the format Name (Brand, Model, Mileage) | +| /get_all_bikes | None | Gets all your bike data from Strava | /get_all_bikes | Returns bike data in the format Name (Brand, Model) | +| /get_bike_by_name | name | Returns specific details about a bike | /get_bike_by_name name: Joe | Returns more bike data in the format name, brand, model, current mileage, and last waxed (date + mileage) | +| /i_waxed_my_chain | bike_name (req) date (optional) mileage (optional) | Updated the last_waxed field on the app. With no optional params passed it will update to the current date and mileage. | /i_waxed_my_chain bike_name: Joe date: 12/24/2024 mileage: 355 | If successful, returns the date and mileage in the system for a last wax, otherwise returns an error. | +| /get_last_ride | none | Returns the last ride you did according to Strava | /get_last_ride | Returns info on the last ride you did. | + ## Known Issues - No known issues diff --git a/app.version b/app.version index 6085e94..f0bb29e 100644 --- a/app.version +++ b/app.version @@ -1 +1 @@ -1.2.1 +1.3.0 diff --git a/package.json b/package.json index 0be3e07..5d9cc74 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fbf-buddy", "private": true, - "version": "1.2.1", + "version": "1.3.0", "description": "Cycling event app for Discord", "main": "app.js", "engines": { diff --git a/src/strava_webhook.js b/src/strava_webhook.js index ae00cfa..a6a6f97 100644 --- a/src/strava_webhook.js +++ b/src/strava_webhook.js @@ -73,8 +73,9 @@ app.post('/webhook', async (req, res) => { // Adds support for GET requests to our webhook app.get('/webhook', (req, res) => { - // Your verify token. Should be a random string. - const VERIFY_TOKEN = "STRAVA"; + console.log('GET request received'); + // Your verify token. Should be a random string. should really hide this + const VERIFY_TOKEN = "spBoS8Zx9oSwZTaW"; // Parses the query params let mode = req.query['hub.mode']; let token = req.query['hub.verify_token']; @@ -90,6 +91,9 @@ app.get('/webhook', (req, res) => { // Responds with '403 Forbidden' if verify tokens do not match res.sendStatus(403); } + } else { + console.log("No token or mode found in query string"); + res.status(500).send('No token or mode found in query string'); } });