core: fix lint

pull/169/head
undefined 3 years ago
parent a68537cb30
commit 10a1de0741

@ -1,9 +1,6 @@
const versionNum = +process.version.replace(/v/gim, '').split('.')[0];
if (versionNum < 14) throw new Error('NodeJS >=v14 required');
if (!global.Hydro) {
global.Hydro = {
version: {

@ -56,7 +56,7 @@ export class StorageModel {
? await StorageModel.coll.find({ path: { $regex: new RegExp(`^${escapeRegExp(target)}`, 'i') } }).toArray()
: await StorageModel.coll.find({ path: { $regex: new RegExp(`^${escapeRegExp(target)}[^/]+$`) } }).toArray();
return results.map((i) => ({
...i, name: i.path, prefix: i.path.split(target)[1],
...i, name: i.path.split(target)[1], prefix: target,
}));
}

Loading…
Cancel
Save