Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ function importCollections(opts, callback) {
if (!collection) {
return cb('> Missing collection name in call to importOne method');
}
//console.log(collection);
collection = /[^/]*$/.exec(collection)[0];

return fsBackend.readFile(`${dataDir}/${collection}.json`, (readErr, readData) => {
//return fsBackend.readFile(`${collection}.json`, (readErr, readData) => {
if (readErr) {
return cb(readErr);
}
Expand Down Expand Up @@ -119,7 +122,6 @@ function main(opts, callback) {

// 1. get collections
const allCollections = fsBackend.scanDirSync(dataDir);

const resolved = resolveSelections(
allCollections,
collectionsToInclude,
Expand All @@ -137,7 +139,6 @@ function main(opts, callback) {
connection: connDb,
dataDir
};

return importCollections(newOpts, callback);
});
}
Expand Down