From 2c5bd901a8426a12b0428492d9a1ca713185e108 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 19 Aug 2019 13:03:48 +0200 Subject: [PATCH] package updates * closes #29 --- package.json | 4 ++-- webtask-mailchimp.js | 22 +++++++++++----------- webtask-youtube.js | 8 ++++---- webtask-zoho.js | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 0b49f40..6994826 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "webtask-tools": "^3.4.0" }, "devDependencies": { - "eslint": "^6.0.0", - "eslint-config-oceanprotocol": "^1.3.0" + "eslint": "^6.2.0", + "eslint-config-oceanprotocol": "^1.4.0" } } diff --git a/webtask-mailchimp.js b/webtask-mailchimp.js index 59fd0ed..9dadd49 100644 --- a/webtask-mailchimp.js +++ b/webtask-mailchimp.js @@ -33,20 +33,20 @@ server.post('/newsletter/:email', (req, res) => { const baseOptions = { url: `${baseUrl}/lists/${listId}/members/${subscriberHash}`, - 'auth': { - 'user': 'oceanprotocol', - 'pass': MAILCHIMP_API_KEY + auth: { + user: 'oceanprotocol', + pass: MAILCHIMP_API_KEY } } const optionsCreate = { ...baseOptions, json: { - 'email_address': emailDecoded, - 'status': 'pending', // double opt-in - 'merge_fields': { + email_address: emailDecoded, + status: 'pending', // double opt-in + merge_fields: { // our GDPR fallback - 'GDPR': 'yes' + GDPR: 'yes' } } } @@ -55,10 +55,10 @@ server.post('/newsletter/:email', (req, res) => { { ...baseOptions, json: { - 'marketing_permissions': [{ - 'marketing_permission_id': marketingPermissionId, - 'text': 'Email', - 'enabled': true + marketing_permissions: [{ + marketing_permission_id: marketingPermissionId, + text: 'Email', + enabled: true }] } } diff --git a/webtask-youtube.js b/webtask-youtube.js index 26f0677..5fc2cbd 100644 --- a/webtask-youtube.js +++ b/webtask-youtube.js @@ -30,7 +30,7 @@ app.get('/', (req, res) => { app.get('/channel/:channelId', (req, res) => { const options = { url: `https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=${req.params.channelId}&maxResults=10&order=date&type=video&key=${req.webtaskContext.secrets.YOUTUBE_API_KEY}`, - headers: { 'referer': req.headers.host } + headers: { referer: req.headers.host } } const parsedPosts = [] @@ -54,7 +54,7 @@ app.get('/channel/:channelId', (req, res) => { app.get('/channel/:channelId/raw', (req, res) => { const options = { url: `https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=${req.params.channelId}&maxResults=10&order=date&type=video&key=${req.webtaskContext.secrets.YOUTUBE_API_KEY}`, - headers: { 'referer': req.headers.host } + headers: { referer: req.headers.host } } makeRequest(options, (videos) => { @@ -65,7 +65,7 @@ app.get('/channel/:channelId/raw', (req, res) => { app.get('/playlist/:playlistId', (req, res) => { const options = { url: `https://www.googleapis.com/youtube/v3/playlistItems?part=snippet%2CcontentDetails&maxResults=10&playlistId=${req.params.playlistId}&key=${req.webtaskContext.secrets.YOUTUBE_API_KEY}`, - headers: { 'referer': req.headers.host } + headers: { referer: req.headers.host } } const parsedPosts = [] @@ -89,7 +89,7 @@ app.get('/playlist/:playlistId', (req, res) => { app.get('/playlist/:playlistId/raw', (req, res) => { const options = { url: `https://www.googleapis.com/youtube/v3/playlistItems?part=snippet%2CcontentDetails&maxResults=10&playlistId=${req.params.playlistId}&key=${req.webtaskContext.secrets.YOUTUBE_API_KEY}`, - headers: { 'referer': req.headers.host } + headers: { referer: req.headers.host } } makeRequest(options, (videos) => { diff --git a/webtask-zoho.js b/webtask-zoho.js index 3a04e2c..b7aacf4 100644 --- a/webtask-zoho.js +++ b/webtask-zoho.js @@ -78,7 +78,7 @@ server.get('/crm/:data', (req, res) => { const options = { url: `${apiUrlZohoCRM}Leads`, - headers: { 'Authorization': `Zoho-oauthtoken ${ZOHO_CRM_TOKEN}` }, + headers: { Authorization: `Zoho-oauthtoken ${ZOHO_CRM_TOKEN}` }, method: 'POST', formData: data }