mirror of
https://github.com/bellingcat/datasheet-server.git
synced 2026-06-11 21:08:33 +03:00
add _buildBlueprintsAsnc in Fetcher
This commit is contained in:
@@ -16,8 +16,12 @@ export const defaultResource = {
|
||||
data: []
|
||||
}
|
||||
|
||||
export function buildDesaturated (tab, resource) {
|
||||
export function buildDesaturated (sheetId, sheetName, tab, resource) {
|
||||
const bp = R.clone(defaultBlueprint)
|
||||
bp.name = sheetName
|
||||
bp.id = sheetId
|
||||
bp.resources[tab] = resource
|
||||
return bp
|
||||
}
|
||||
|
||||
// import all default exports from 'blueprinters' folder
|
||||
@@ -33,5 +37,6 @@ fs.readdirSync(normalizedPath).forEach(file => {
|
||||
// each file in blueprinters folder available for granular import from here.
|
||||
module.exports = Object.assign({
|
||||
defaultBlueprint,
|
||||
defaultResource
|
||||
defaultResource,
|
||||
buildDesaturated
|
||||
}, allBps)
|
||||
|
||||
Reference in New Issue
Block a user