mirror of
https://github.com/bellingcat/datasheet-server.git
synced 2026-06-11 21:08:33 +03:00
fix lint and prev commit errors
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
"dev": "NODE_ENV=development nodemon -w src --exec \"babel-node src\"",
|
"dev": "NODE_ENV=development nodemon -w src --exec \"babel-node src\"",
|
||||||
"build": "NODE_ENV=production npx babel src -d dist",
|
"build": "NODE_ENV=production npx babel src -d dist",
|
||||||
"start": "node dist",
|
"start": "node dist",
|
||||||
"lint": "standard \"src/**/*.js\" \"test/**/*/js\"",
|
"lint": "standard \"src/**/*.js\" \"test/**/*.js\"",
|
||||||
"test-watch": "ava --watch",
|
"test-watch": "ava --watch",
|
||||||
"test": "ava --verbose"
|
"test": "ava --verbose"
|
||||||
},
|
},
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"graphql": "^0.13.2",
|
"graphql": "^0.13.2",
|
||||||
"morgan": "^1.8.0",
|
"morgan": "^1.8.0",
|
||||||
"mz": "^2.7.0",
|
"mz": "^2.7.0",
|
||||||
"node-fetch": "^2.2.0",
|
"node-fetch": "^2.3.0",
|
||||||
"object-hash": "^1.3.0",
|
"object-hash": "^1.3.0",
|
||||||
"ramda": "^0.25.0",
|
"ramda": "^0.25.0",
|
||||||
"resource-router-middleware": "^0.6.0"
|
"resource-router-middleware": "^0.6.0"
|
||||||
@@ -42,6 +42,7 @@
|
|||||||
"@babel/cli": "^7.1.2",
|
"@babel/cli": "^7.1.2",
|
||||||
"@babel/core": "^7.1.2",
|
"@babel/core": "^7.1.2",
|
||||||
"@babel/node": "^7.0.0",
|
"@babel/node": "^7.0.0",
|
||||||
|
"@babel/polyfill": "^7.0.0",
|
||||||
"@babel/preset-env": "^7.1.0",
|
"@babel/preset-env": "^7.1.0",
|
||||||
"@babel/register": "^7.0.0",
|
"@babel/register": "^7.0.0",
|
||||||
"ava": "1.0.0-beta.8",
|
"ava": "1.0.0-beta.8",
|
||||||
@@ -59,7 +60,8 @@
|
|||||||
"test/**/*.js"
|
"test/**/*.js"
|
||||||
],
|
],
|
||||||
"require": [
|
"require": [
|
||||||
"@babel/register"
|
"@babel/register",
|
||||||
|
"@babel/polyfill"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ class Controller {
|
|||||||
retrieve (sheet, tab, resource) {
|
retrieve (sheet, tab, resource) {
|
||||||
if (this._sheetExists(sheet)) {
|
if (this._sheetExists(sheet)) {
|
||||||
const fetcher = this.fetchers[sheet]
|
const fetcher = this.fetchers[sheet]
|
||||||
// console.log(fetcher);
|
|
||||||
return fetcher.retrieve(tab, resource)
|
return fetcher.retrieve(tab, resource)
|
||||||
} else {
|
} else {
|
||||||
return Promise.reject(new Error(copy.errors.noResource(sheet)))
|
return Promise.reject(new Error(copy.errors.noResource(sheet)))
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ class Fetcher {
|
|||||||
|
|
||||||
retrieveFrag (tab, resource, frag) {
|
retrieveFrag (tab, resource, frag) {
|
||||||
const title = fmtName(tab)
|
const title = fmtName(tab)
|
||||||
const url = `${this.sheetName}/${tab}/${resource}/${frag || ''}`
|
const url = `${this.id}/${tab}/${resource}/${frag || ''}`
|
||||||
return this.db.load(url, this.blueprints[title])
|
return this.db.load(url, this.blueprints[title])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user