mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:57:08 +00:00
Move path conversion to general utilities
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const fs = require('fs/promises');
|
||||
const Path = require('path');
|
||||
const mime = require('./mime-types');
|
||||
const { translatePath, logicalRoot } = require('./logical');
|
||||
const { translatePath, logicalRoot } = require('../utils/logicalPath');
|
||||
const systemCfg = require('../config');
|
||||
const projectCfg = require('../db/configuration');
|
||||
|
||||
|
||||
@@ -5,5 +5,6 @@ module.exports = {
|
||||
replaceMarkers: require('./replaceMarkers'),
|
||||
flattenQCDefinitions: require('./flattenQCDefinitions'),
|
||||
deepMerge: require('./deepMerge'),
|
||||
removeNulls: require('./removeNulls')
|
||||
removeNulls: require('./removeNulls'),
|
||||
logicalPath: require('./logicalPath')
|
||||
};
|
||||
|
||||
@@ -10,6 +10,7 @@ function translatePath (file) {
|
||||
return physicalPath;
|
||||
} else {
|
||||
// An attempt to break out of the logical path?
|
||||
console.warn("Attempting to break out of the logical path?", physicalPath, prefix);
|
||||
throw {
|
||||
status: 404,
|
||||
message: "Not found"
|
||||
Reference in New Issue
Block a user