diff --git a/simple/doxbee-async.js b/simple/doxbee-async.js index 40b091a7..e505a5ff 100644 --- a/simple/doxbee-async.js +++ b/simple/doxbee-async.js @@ -49,7 +49,6 @@ module.exports = async function doxbee(stream, idOrPath) { const previousId = file ? file.version : null; const version = { userAccountId: fakes.userAccount.id, - date: new Date(), blobId: blobId, creatorId: fakes.userAccount.id, previousId: previousId diff --git a/simple/doxbee-promise.js b/simple/doxbee-promise.js index 1897ab6e..aabcd86c 100644 --- a/simple/doxbee-promise.js +++ b/simple/doxbee-promise.js @@ -55,7 +55,6 @@ module.exports = function doxbee(stream, idOrPath) { const previousId = file ? file.version : null; version = { userAccountId: fakes.userAccount.id, - date: new Date(), blobId: blobId, creatorId: fakes.userAccount.id, previousId: previousId @@ -65,8 +64,8 @@ module.exports = function doxbee(stream, idOrPath) { }) .then(_ => { if (!file) { - const splitPath = idOrPath.split("/"); - const fileName = splitPath[splitPath.length - 1]; + const splitPath = idOrPath.lastIndexOf("/") + 1; + const fileName = idOrPath.substring(splitPath); const newId = fakes.uuid.v1(); return fakes.self .createQuery(idOrPath, {