mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
change: use isContainerIdentifier in FixedContentTypeMapper
This commit is contained in:
parent
f686b4853f
commit
f23073b87f
@ -4,7 +4,7 @@ import { getLoggerFor } from '../../logging/LogUtil';
|
|||||||
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
|
||||||
import {
|
import {
|
||||||
encodeUriPathComponents,
|
encodeUriPathComponents,
|
||||||
ensureTrailingSlash,
|
ensureTrailingSlash, isContainerIdentifier,
|
||||||
trimTrailingSlashes,
|
trimTrailingSlashes,
|
||||||
} from '../../util/PathUtil';
|
} from '../../util/PathUtil';
|
||||||
import type { FileIdentifierMapper, ResourceLink } from '../FileIdentifierMapper';
|
import type { FileIdentifierMapper, ResourceLink } from '../FileIdentifierMapper';
|
||||||
@ -35,7 +35,7 @@ export class FixedContentTypeMapper implements FileIdentifierMapper {
|
|||||||
const filePath = getAbsolutePath(this.rootFilepath, path);
|
const filePath = getAbsolutePath(this.rootFilepath, path);
|
||||||
|
|
||||||
// Container
|
// Container
|
||||||
if (identifier.path.endsWith('/')) {
|
if (isContainerIdentifier(identifier)) {
|
||||||
this.logger.debug(`URL ${identifier.path} points to the container ${filePath}`);
|
this.logger.debug(`URL ${identifier.path} points to the container ${filePath}`);
|
||||||
return {
|
return {
|
||||||
identifier,
|
identifier,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user