Skip to content

Commit 460d0ed

Browse files
committed
Improve naming of constant for new files content types
1 parent 592c378 commit 460d0ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/handlers/patch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const PATCH_PARSERS = {
1616
'text/n3': require('./patch/n3-patch-parser.js')
1717
}
1818

19-
const DEFAULT_PATCH_CONTENT_TYPE = 'text/turtle'
19+
const DEFAULT_FOR_NEW_CONTENT_TYPE = 'text/turtle'
2020

2121
// Handles a PATCH request
2222
async function patchHandler (req, res, next) {
@@ -32,7 +32,7 @@ async function patchHandler (req, res, next) {
3232
} catch (err) {
3333
// If the file doesn't exist, request one to be created with the default content type
3434
({ path, contentType } = await ldp.resourceMapper.mapUrlToFile(
35-
{ url: req, createIfNotExists: true, contentType: DEFAULT_PATCH_CONTENT_TYPE }))
35+
{ url: req, createIfNotExists: true, contentType: DEFAULT_FOR_NEW_CONTENT_TYPE }))
3636
}
3737
const { url } = await ldp.resourceMapper.mapFileToUrl({ path, hostname: req.hostname })
3838
const resource = { path, contentType, url }

0 commit comments

Comments
 (0)