From 5d6af1ca3397998b82b9cfe883e3f61369419766 Mon Sep 17 00:00:00 2001 From: Damien Bunlet Date: Tue, 7 Nov 2023 10:16:07 +0100 Subject: [PATCH 1/2] From HTTP to HTTPS --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 00c41e0..c267837 100644 --- a/index.js +++ b/index.js @@ -2,9 +2,9 @@ const crypto = require('crypto'); const request = require('request'); -const API_BASE = 'http://platform.fatsecret.com/rest/server.api'; -const OAUTH_REQUEST_TOKEN = 'http://www.fatsecret.com/oauth/request_token'; -const OAUTH_ACESS_TOKEN = 'http://www.fatsecret.com/oauth/access_token'; +const API_BASE = 'https://platform.fatsecret.com/rest/server.api'; +const OAUTH_REQUEST_TOKEN = 'https://www.fatsecret.com/oauth/request_token'; +const OAUTH_ACESS_TOKEN = 'https://www.fatsecret.com/oauth/access_token'; const DEFAULT_PARAMS = { format : 'json', From 50dc38ca222e10309d57719e3c81dde6edeaeff3 Mon Sep 17 00:00:00 2001 From: Damien Bunlet Date: Tue, 7 Nov 2023 10:40:07 +0100 Subject: [PATCH 2/2] Update version of package request --- index.js | 6 +++--- package.json | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index c267837..1c3bb68 100644 --- a/index.js +++ b/index.js @@ -1,10 +1,10 @@ 'use strict'; const crypto = require('crypto'); -const request = require('request'); +const request = require('@cypress/request'); const API_BASE = 'https://platform.fatsecret.com/rest/server.api'; const OAUTH_REQUEST_TOKEN = 'https://www.fatsecret.com/oauth/request_token'; -const OAUTH_ACESS_TOKEN = 'https://www.fatsecret.com/oauth/access_token'; +const OAUTH_ACCESS_TOKEN = 'https://www.fatsecret.com/oauth/access_token'; const DEFAULT_PARAMS = { format : 'json', @@ -76,7 +76,7 @@ class FatSecret { oauth_consumer_key : this.key, oauth_signature_method: 'HMAC-SHA1' }; - return this._signRequest(OAUTH_ACESS_TOKEN, params); + return this._signRequest(OAUTH_ACCESS_TOKEN, params); } /** diff --git a/package.json b/package.json index d7a6d46..4863e8d 100644 --- a/package.json +++ b/package.json @@ -6,13 +6,13 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "repository" : { - "type" : "git", - "url" : "https://github.com/OverFlow636/fatsecret.git" + "repository": { + "type": "git", + "url": "https://github.com/OverFlow636/fatsecret.git" }, "author": "Joey Jan", "license": "MIT", "dependencies": { - "request": "^2.81.0" + "@cypress/request": "^3.0.1" } }