mirror of
https://github.com/oceanprotocol/webtasks
synced 2025-01-06 20:05:40 +01:00
switch to eslint-config-oceanprotocol
This commit is contained in:
parent
127ad00d60
commit
f42e0bdeb5
@ -1,6 +1,3 @@
|
|||||||
{
|
{
|
||||||
"extends": "ascribe",
|
"extends": "oceanprotocol"
|
||||||
"rules": {
|
|
||||||
"func-names": 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
![giphy](https://user-images.githubusercontent.com/90316/37671913-0eb2f70a-2c6d-11e8-809e-04d3b40ef1c9.gif)
|
![giphy](https://user-images.githubusercontent.com/90316/37671913-0eb2f70a-2c6d-11e8-809e-04d3b40ef1c9.gif)
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.com/oceanprotocol/webtasks.svg?token=3psqw6c8KMDqfdGQ2x6d&branch=master)](https://travis-ci.com/oceanprotocol/webtasks)
|
[![Build Status](https://travis-ci.com/oceanprotocol/webtasks.svg?token=3psqw6c8KMDqfdGQ2x6d&branch=master)](https://travis-ci.com/oceanprotocol/webtasks)
|
||||||
[![js ascribe](https://img.shields.io/badge/js-ascribe-39BA91.svg)](https://github.com/ascribe/javascript)
|
[![js oceanprotocol](https://img.shields.io/badge/js-oceanprotocol-7b1173.svg)](https://github.com/oceanprotocol/eslint-config-oceanprotocol)
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
|
13
package.json
13
package.json
@ -4,7 +4,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "wt serve webtask-zoho.js",
|
"start": "wt serve webtask-zoho.js",
|
||||||
"test": "eslint ./{src,public}/**/*.js"
|
"test": "eslint ./*.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"body-parser": "^1.18.3",
|
"body-parser": "^1.18.3",
|
||||||
@ -14,9 +14,12 @@
|
|||||||
"webtask-tools": "^3.2.1"
|
"webtask-tools": "^3.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-eslint": "^8.2.5",
|
"eslint": "^5.0.1",
|
||||||
"eslint": "^4.19.1",
|
"eslint-config-oceanprotocol": "^1.0.4",
|
||||||
"eslint-config-ascribe": "^3.0.5",
|
"eslint-config-standard": "^11.0.0",
|
||||||
"eslint-plugin-import": "^2.13.0"
|
"eslint-plugin-import": "^2.13.0",
|
||||||
|
"eslint-plugin-node": "^6.0.1",
|
||||||
|
"eslint-plugin-promise": "^3.8.0",
|
||||||
|
"eslint-plugin-standard": "^3.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ app.get('/:username', (req, res) => {
|
|||||||
|
|
||||||
request(url, (error, response) => {
|
request(url, (error, response) => {
|
||||||
const json = JSON.parse(response.body.replace('])}while(1);</x>', ''))
|
const json = JSON.parse(response.body.replace('])}while(1);</x>', ''))
|
||||||
const posts = json.payload.posts // eslint-disable-line prefer-destructuring
|
const posts = json.payload.posts
|
||||||
const parsedPosts = []
|
const parsedPosts = []
|
||||||
let holder = {}
|
let holder = {}
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ app.get('/:username/raw', (req, res) => {
|
|||||||
|
|
||||||
request(url, (error, response) => {
|
request(url, (error, response) => {
|
||||||
const json = JSON.parse(response.body.replace('])}while(1);</x>', ''))
|
const json = JSON.parse(response.body.replace('])}while(1);</x>', ''))
|
||||||
const posts = json.payload.posts // eslint-disable-line prefer-destructuring
|
const posts = json.payload.posts
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
return
|
return
|
||||||
|
@ -18,7 +18,7 @@ app.get('/:playlist', (req, res) => {
|
|||||||
|
|
||||||
request(options, (error, response, body) => {
|
request(options, (error, response, body) => {
|
||||||
const json = JSON.parse(body)
|
const json = JSON.parse(body)
|
||||||
const videos = json.items // eslint-disable-line prefer-destructuring
|
const videos = json.items
|
||||||
const parsedPosts = []
|
const parsedPosts = []
|
||||||
|
|
||||||
let holder = {}
|
let holder = {}
|
||||||
|
@ -58,7 +58,7 @@ server.get('/newsletter/:data', (req, res) => {
|
|||||||
const { data } = req.params
|
const { data } = req.params
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
url: `${apiUrlZohoCampaigns}json/listsubscribe?authtoken=${ZOHO_CAMPAIGNS_TOKEN}&scope=CampaignsAPI&resfmt=JSON&listkey=${ZOHO_CAMPAIGNS_LIST_KEY}&contactinfo=${decodeURIComponent(data)}` // eslint-disable-line max-len
|
url: `${apiUrlZohoCampaigns}json/listsubscribe?authtoken=${ZOHO_CAMPAIGNS_TOKEN}&scope=CampaignsAPI&resfmt=JSON&listkey=${ZOHO_CAMPAIGNS_LIST_KEY}&contactinfo=${decodeURIComponent(data)}`
|
||||||
}
|
}
|
||||||
sendRequest(options, res)
|
sendRequest(options, res)
|
||||||
})
|
})
|
||||||
@ -69,7 +69,7 @@ server.get('/newsletter/:data', (req, res) => {
|
|||||||
//
|
//
|
||||||
server.get('/crm', (req, res) => {
|
server.get('/crm', (req, res) => {
|
||||||
res.send(`<h3>Please pass your data in the following format</h3>
|
res.send(`<h3>Please pass your data in the following format</h3>
|
||||||
- <code>/crm/{First Name:First Name, Last Name:Last Name,Contact Email:info@oceanprotocol.com}</code>`) // eslint-disable-line max-len
|
- <code>/crm/{First Name:First Name, Last Name:Last Name,Contact Email:info@oceanprotocol.com}</code>`)
|
||||||
})
|
})
|
||||||
|
|
||||||
server.get('/crm/:data', (req, res) => {
|
server.get('/crm/:data', (req, res) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user