mirror of
https://github.com/bellingcat/datasheet-server.git
synced 2026-06-11 21:08:33 +03:00
rename source to sheet
This commit is contained in:
@@ -2,19 +2,19 @@ import R from 'ramda'
|
||||
import { defaultBlueprint, defaultRoute } from '../lib/blueprinters'
|
||||
|
||||
/**
|
||||
* byColumn - generate a Blueprint from a data source by column. Each column
|
||||
* name is a resource, and all values in that column are the resource items.
|
||||
* byColumn - generate a Blueprint from a data sheet by column. Each column
|
||||
* name is a resheet, and all values in that column are the resheet items.
|
||||
*
|
||||
* @param {type} data - list of lists representing sheet data.
|
||||
* @return {type} Blueprint
|
||||
* generated.
|
||||
*/
|
||||
export default function byColumn (tabName, sourceName, sourceId, data) {
|
||||
export default function byColumn (tabName, sheetName, sheetId, data) {
|
||||
// Define Blueprint props
|
||||
const bp = R.clone(defaultBlueprint)
|
||||
bp.source = {
|
||||
name: sourceName,
|
||||
id: sourceId
|
||||
bp.sheet = {
|
||||
name: sheetName,
|
||||
id: sheetId
|
||||
}
|
||||
bp.name = tabName
|
||||
|
||||
|
||||
Reference in New Issue
Block a user