1
0
mirror of https://github.com/oceanprotocol/webtasks synced 2025-01-06 20:05:40 +01:00

package updates

* closes #29
This commit is contained in:
Matthias Kretschmann 2019-08-19 13:03:48 +02:00
parent 4a9355bed3
commit 2c5bd901a8
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 18 additions and 18 deletions

View File

@ -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"
}
}

View File

@ -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
}]
}
}

View File

@ -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) => {

View File

@ -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
}