Skip to content

Commit 50efa54

Browse files
authored
Merge pull request #1304 from megoth/dev
Merge megoth dev with nss dev
2 parents 0974bba + fa6cb0c commit 50efa54

File tree

4 files changed

+462
-36
lines changed

4 files changed

+462
-36
lines changed

lib/capability-discovery.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function serviceCapabilityDocument () {
3333
const ldp = req.app.locals.ldp
3434
res.json({
3535
// Add the server root url
36-
root: req.app.locals.ldp.resourceMapper.resolveUrl(req.hostname, req.path),
36+
root: ldp.resourceMapper.resolveUrl(req.hostname, req.path),
3737
// Add the 'apps' urls section
3838
apps: req.app.locals.appUrls,
3939
api: {
@@ -44,8 +44,8 @@ function serviceCapabilityDocument () {
4444
// Create new user (see IdentityProvider.post() in identity-provider.js)
4545
new: new URL('/api/accounts/new', ldp.serverUri),
4646
recover: new URL('/api/accounts/recover', ldp.serverUri),
47-
signin: req.app.locals.ldp.resourceMapper.resolveUrl(req.hostname, '/login'),
48-
signout: req.app.locals.ldp.resourceMapper.resolveUrl(req.hostname, '/logout'),
47+
signin: ldp.resourceMapper.resolveUrl(req.hostname, '/login'),
48+
signout: ldp.resourceMapper.resolveUrl(req.hostname, '/logout'),
4949
validateToken: new URL('/api/accounts/validateToken', ldp.serverUri)
5050
}
5151
}

lib/handlers/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async function handler (req, res, next) {
1313
const requestedType = negotiator.mediaType()
1414

1515
try {
16-
const { path: filename } = await req.app.locals.ldp.resourceMapper.mapUrlToFile({ url: req })
16+
const { path: filename } = await ldp.resourceMapper.mapUrlToFile({ url: req })
1717

1818
const stats = await ldp.stat(filename)
1919
if (!stats.isDirectory()) {

0 commit comments

Comments
 (0)