mirror of
https://github.com/bellingcat/datasheet-server.git
synced 2026-06-09 11:58:33 +03:00
Compare commits
1 Commits
feature/ad
...
grenfell
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9455348001 |
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@@ -10,16 +10,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
- uses: actions/setup-node@v2-beta
|
||||
with:
|
||||
node-version: '12'
|
||||
|
||||
- run: npm install
|
||||
- run: npm test
|
||||
env:
|
||||
CI: true
|
||||
- run: npm run lint
|
||||
env:
|
||||
CI: true
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ export default ({ config, controller }) => {
|
||||
success: msg
|
||||
})
|
||||
)
|
||||
.catch(err => {
|
||||
.catch(err =>
|
||||
res.status(404)
|
||||
.send({ error: err.message, err })
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
api.get('/:sheet/:tab/:resource/:frag', (req, res) => {
|
||||
|
||||
1
src/datasheet.config.js
Symbolic link
1
src/datasheet.config.js
Symbolic link
@@ -0,0 +1 @@
|
||||
CONFIG=../configs/timemap/grenfell/datasheet.config.js
|
||||
@@ -7,7 +7,6 @@ function prefixedTabs (prefix, cfg) {
|
||||
[`${prf('events')}export_events`]: BP.deeprows,
|
||||
[`${prf('associations')}export_associations`]: BP.deeprows,
|
||||
[`${prf('sources')}export_sources`]: BP.deepids,
|
||||
[`${prf('shapes')}export_shapes`]: BP.deeprows,
|
||||
[`${prf('sites')}export_sites`]: BP.rows
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import copy from '../copy/en'
|
||||
|
||||
/**
|
||||
* Controller class
|
||||
* Controller
|
||||
*
|
||||
*/
|
||||
class Controller {
|
||||
|
||||
@@ -217,10 +217,7 @@ class GsheetFetcher extends Fetcher {
|
||||
})
|
||||
.then(this._buildBlueprintsAsync())
|
||||
.then(() => true)
|
||||
.catch((err) => {
|
||||
console.log(`Error fetching gsheets: ${err.message} `)
|
||||
return false
|
||||
})
|
||||
.catch(() => false)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ class StoreJson {
|
||||
|
||||
save (url, data) {
|
||||
const parts = url.split('/')
|
||||
|
||||
return fs.writeFile(
|
||||
`${STORAGE_DIRNAME}/${parts[0]}__${parts[1]}__${parts[2]}.json`,
|
||||
JSON.stringify(data)
|
||||
|
||||
@@ -12,8 +12,6 @@ const egInput1 = [
|
||||
[4, 5, 6]
|
||||
]
|
||||
|
||||
// Test default blueprint exports
|
||||
// Smoke tests
|
||||
test('defaultBlueprint exports', t => {
|
||||
const expected = {
|
||||
sheet: {
|
||||
|
||||
Reference in New Issue
Block a user