Skip to content

Commit

Permalink
Merge pull request #41 from bourgeoa/master
Browse files Browse the repository at this point in the history
update uuid
  • Loading branch information
jeff-zucker authored Aug 12, 2020
2 parents 6db5df4 + 12d34e8 commit 9d02d50
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
34 changes: 17 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"cross-fetch": "^3.0.5",
"fs-extra": "^9.0.1",
"mime-types": "^2.1.27",
"uuid": "^8.2.0"
"uuid": "^8.3.0"
},
"peerDependencies": {
"browserfs": "^1.4.3"
Expand Down
6 changes: 3 additions & 3 deletions src/rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const libPath = require("path");
//const path = require("path");

const { Response } = require('cross-fetch')
const uuid = require('uuid')
const { v1: uuidv1 } = require('uuid')
const contentTypeLookup = require('mime-types').contentType

const linkExt = ['.acl', '.meta']
Expand Down Expand Up @@ -363,11 +363,11 @@ async function getLinks (pathname, options) {
return links
}

async function _getAvailableUrl (pathname, slug = uuid.v1(), options) {
async function _getAvailableUrl (pathname, slug = uuidv1(), options) {
let requestUrl = _mungePath(pathname, slug, options)
if(options.resourceType==='Container' && !requestUrl.endsWith(options.mungedPath.sep)) requestUrl = requestUrl + options.mungedPath.sep
let urlExists = (await self.storage(options).getObjectType(requestUrl, options))[1]
if (urlExists) { slug = `${uuid.v1()}-${slug}` }
if (urlExists) { slug = `${uuidv1()}-${slug}` }
return slug
}

Expand Down

0 comments on commit 9d02d50

Please sign in to comment.