Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Updating to more recent version of NodeJS and also fixing a couple bad variable references #28

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "1.0.0",
"description": "Sample web app and helper scripts to get started with Twitter's Account Activity API",
"engines": {
"node": "5.9.1"
"node": "14.x",
"yarn": "~1"
},
"main": "index.js",
"scripts": {
Expand Down
11 changes: 6 additions & 5 deletions routes/sub-callbacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ var actions = {}
actions.addsub = function (user) {
sub_request_options.oauth.token = user.access_token
sub_request_options.oauth.token_secret = user.access_token_secret

console.log("✅ Add Sub Final Parameters");
console.log(sub_request_options);
return request.post(sub_request_options)
}

actions.removesub = function (user) {
sub_request_options.oauth.token = user.access_token
sub_request_options.oauth.token_secret = user.access_token_secret

console.log("✅ Add Remove Final Parameters");
console.log(sub_request_options);
return request.delete(sub_request_options)
}

Expand Down Expand Up @@ -57,7 +59,7 @@ module.exports = function (req, resp) {
} else {
var json_response = {
title: 'Error',
message: 'Action "' + req.params.action + '"" not defined.',
message: 'Action "' + req.params.action + '"" not defined.',
button: {
title: 'Ok',
url: '/subscriptions'
Expand All @@ -66,5 +68,4 @@ module.exports = function (req, resp) {
resp.status(404);
resp.render('status', json_response)
}
}

}
4 changes: 2 additions & 2 deletions routes/subscriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ module.exports = function (req, response) {
}
}

resp.status(500);
resp.render('status', json_response)
response.status(500);
response.render('status', json_response)
})

}
3 changes: 3 additions & 0 deletions routes/webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ webhook.get_config = function (req, resp) {
url: 'https://api.twitter.com/1.1/account_activity/all/' + auth.twitter_webhook_environment + '/webhooks.json',
oauth: auth.twitter_oauth
}

console.log("✅ Getting webhook config params");
console.log(request_options);

request.get(request_options)

Expand Down
Loading