mirror of
https://github.com/bellingcat/datasheet-server.git
synced 2026-06-10 12:28:34 +03:00
Compare commits
1 Commits
develop
...
feature/ve
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b65c4ad2e2 |
@@ -4,12 +4,12 @@ LABEL authors="Lachlan Kermode <lk@forensic-architecture.org>"
|
|||||||
|
|
||||||
# Install app dependencies
|
# Install app dependencies
|
||||||
COPY package.json /www/package.json
|
COPY package.json /www/package.json
|
||||||
RUN cd /www; npm install
|
RUN cd /www; yarn
|
||||||
|
|
||||||
# Copy app source
|
# Copy app source
|
||||||
COPY . /www
|
COPY . /www
|
||||||
WORKDIR /www
|
WORKDIR /www
|
||||||
RUN npm run build
|
RUN yarn build
|
||||||
RUN mkdir -p data
|
RUN mkdir -p data
|
||||||
|
|
||||||
# set your port
|
# set your port
|
||||||
@@ -17,4 +17,4 @@ ENV PORT 4040
|
|||||||
EXPOSE 4040
|
EXPOSE 4040
|
||||||
|
|
||||||
# start command as per package.json
|
# start command as per package.json
|
||||||
CMD ["npm", "start"]
|
CMD ["yarn", "start"]
|
||||||
|
|||||||
Binary file not shown.
9478
package-lock.json
generated
9478
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -30,10 +30,10 @@ export default ({ config, controller }) => {
|
|||||||
success: msg
|
success: msg
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
.catch(err => {
|
.catch(err =>
|
||||||
res.status(404)
|
res.status(404)
|
||||||
.send({ error: err.message, err })
|
.send({ error: err.message, err })
|
||||||
})
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
api.get('/:sheet/:tab/:resource/:frag', (req, res) => {
|
api.get('/:sheet/:tab/:resource/:frag', (req, res) => {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ function prefixedTabs (prefix, cfg) {
|
|||||||
return {
|
return {
|
||||||
[`${prf('events')}export_events`]: BP.deeprows,
|
[`${prf('events')}export_events`]: BP.deeprows,
|
||||||
[`${prf('associations')}export_associations`]: BP.deeprows,
|
[`${prf('associations')}export_associations`]: BP.deeprows,
|
||||||
|
[`${prf('editorials')}export_editorials`]: BP.deeprows,
|
||||||
[`${prf('sources')}export_sources`]: BP.deepids,
|
[`${prf('sources')}export_sources`]: BP.deepids,
|
||||||
[`${prf('shapes')}export_shapes`]: BP.deeprows,
|
|
||||||
[`${prf('sites')}export_sites`]: BP.rows
|
[`${prf('sites')}export_sites`]: BP.rows
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import copy from '../copy/en'
|
import copy from '../copy/en'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controller class
|
* Controller
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class Controller {
|
class Controller {
|
||||||
|
|||||||
@@ -217,10 +217,7 @@ class GsheetFetcher extends Fetcher {
|
|||||||
})
|
})
|
||||||
.then(this._buildBlueprintsAsync())
|
.then(this._buildBlueprintsAsync())
|
||||||
.then(() => true)
|
.then(() => true)
|
||||||
.catch((err) => {
|
.catch(() => false)
|
||||||
console.log(`Error fetching gsheets: ${err.message} `)
|
|
||||||
return false
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ class StoreJson {
|
|||||||
|
|
||||||
save (url, data) {
|
save (url, data) {
|
||||||
const parts = url.split('/')
|
const parts = url.split('/')
|
||||||
|
|
||||||
return fs.writeFile(
|
return fs.writeFile(
|
||||||
`${STORAGE_DIRNAME}/${parts[0]}__${parts[1]}__${parts[2]}.json`,
|
`${STORAGE_DIRNAME}/${parts[0]}__${parts[1]}__${parts[2]}.json`,
|
||||||
JSON.stringify(data)
|
JSON.stringify(data)
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ const egInput1 = [
|
|||||||
[4, 5, 6]
|
[4, 5, 6]
|
||||||
]
|
]
|
||||||
|
|
||||||
// Test default blueprint exports
|
|
||||||
// Smoke tests
|
|
||||||
test('defaultBlueprint exports', t => {
|
test('defaultBlueprint exports', t => {
|
||||||
const expected = {
|
const expected = {
|
||||||
sheet: {
|
sheet: {
|
||||||
|
|||||||
Reference in New Issue
Block a user