mirror of
https://github.com/bellingcat/datasheet-server.git
synced 2026-06-07 19:08:34 +03:00
Merge pull request #54 from forensic-architecture/feature/refactor-filters-and-narratives-to-associations
Feature/refactor filters and narratives to associations
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -14,3 +14,4 @@ tags
|
||||
tags.lock
|
||||
tags.temp
|
||||
src/config.js
|
||||
src/local.config.js
|
||||
|
||||
Binary file not shown.
5
package-lock.json
generated
5
package-lock.json
generated
@@ -4894,6 +4894,11 @@
|
||||
"minimist": "^1.2.5"
|
||||
}
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.27.0",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz",
|
||||
"integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ=="
|
||||
},
|
||||
"morgan": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz",
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import StoreJson from './models/StoreJson'
|
||||
import fetchers from './lib/Fetcher'
|
||||
import Controller from './lib/Controller'
|
||||
import config from './config'
|
||||
import R from 'ramda'
|
||||
|
||||
const isntNull = n => n !== null
|
||||
@@ -9,6 +8,13 @@ const filterNull = ls => R.filter(isntNull, ls)
|
||||
const flattenfilterNull = ls => filterNull(R.flatten(ls))
|
||||
let themFetchers
|
||||
|
||||
let config
|
||||
try {
|
||||
config = require('./local.config.js').default
|
||||
} catch (_) {
|
||||
config = require('./config.js').default
|
||||
}
|
||||
|
||||
export default callback => {
|
||||
return Promise.resolve().then(() => {
|
||||
return Object.keys(config).map(fType => {
|
||||
|
||||
@@ -6,8 +6,7 @@ function prefixedTabs (prefix, cfg) {
|
||||
return {
|
||||
[`${prf('events')}export_events`]: BP.deeprows,
|
||||
[`${prf('categories')}export_categories`]: [BP.groups, BP.rows],
|
||||
[`${prf('filters')}export_filters`]: BP.tree,
|
||||
[`${prf('narratives')}export_narratives`]: BP.rows,
|
||||
[`${prf('associations')}export_associations`]: BP.deeprows,
|
||||
[`${prf('sources')}export_sources`]: BP.deepids,
|
||||
[`${prf('sites')}export_sites`]: BP.rows
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user