Commit 48ecacce authored by Adrien Pavie's avatar Adrien Pavie
Browse files

Fix URL in dump metadata

parent 2ec93440
......@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## Next version (to be released)
### Fixed
- URL in metadata file for dump exports
## 0.2.2 - 2020-06-25
......
......@@ -15,15 +15,16 @@ if(!fs.existsSync(DUMP_DIR)) {
// Dump a single theme + format
const dumpTheme = (theme, format) => {
const fileName = `${theme.id}_${format}.zip`;
return db.getThemeData(theme, null, {
format: format,
url: (CONFIG.API_BASE_URL || "http://localhost:3000") + "/dump/" + theme.id + ".geojson",
url: (CONFIG.API_BASE_URL || "http://localhost:3000") + "/dump/" + fileName,
metadata: true,
aspoint: format === "csv"
})
.then(outFile => {
// Copy + remove to support cross-device mv
fs.copyFileSync(outFile, `${DUMP_DIR}/${theme.id}_${format}.zip`);
fs.copyFileSync(outFile, `${DUMP_DIR}/${fileName}`);
fs.unlinkSync(outFile);
return true;
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment