Skip to content

Commit 6ba0869

Browse files
replace basename with dirname
1 parent 67c1e33 commit 6ba0869

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,25 @@ module.exports = function attachToServer (server, app, opts) {
1010
app.post('/*', function (req, res, next) {
1111
debug('pub ' + req.originalUrl + ' after post')
1212
solidWs.publish(req.originalUrl)
13-
solidWs.publish(path.basename(req.originalUrl))
13+
solidWs.publish(path.dirname(req.originalUrl) + path.sep)
1414
next()
1515
})
1616
app.patch('/*', function (req, res, next) {
1717
debug('pub ' + req.originalUrl + ' after patch')
1818
solidWs.publish(req.originalUrl)
19-
console.log(solidWs.store)
19+
solidWs.publish(path.dirname(req.originalUrl) + path.sep)
2020
next()
2121
})
2222
app.put('/*', function (req, res, next) {
2323
debug('pub ' + req.originalUrl + ' after put')
2424
solidWs.publish(req.originalUrl)
25+
solidWs.publish(path.dirname(req.originalUrl) + path.sep)
2526
next()
2627
})
2728
app.delete('/*', function (req, res, next) {
2829
debug('pub ' + req.originalUrl + ' after delete')
2930
solidWs.publish(req.originalUrl)
30-
solidWs.publish(path.basename(req.originalUrl))
31+
solidWs.publish(path.dirname(req.originalUrl) + path.sep)
3132
next()
3233
})
3334
}

0 commit comments

Comments
 (0)