feat: Add Content-Type constructor to metadata.

This commit is contained in:
Ruben Verborgh
2021-01-10 21:31:55 +01:00
parent 775aaa79cd
commit be1af89b56
18 changed files with 67 additions and 47 deletions

View File

@@ -7,7 +7,6 @@ import { TEXT_TURTLE } from '../util/ContentTypes';
import { NotFoundHttpError } from '../util/errors/NotFoundHttpError';
import { ensureTrailingSlash } from '../util/PathUtil';
import { guardedStreamFrom } from '../util/StreamUtil';
import { CONTENT_TYPE } from '../util/Vocabularies';
import { Initializer } from './Initializer';
/**
@@ -67,7 +66,7 @@ export class AclInitializer extends Initializer {
acl:mode acl:Control;
acl:accessTo <${this.baseUrl}>;
acl:default <${this.baseUrl}>.`;
const metadata = new RepresentationMetadata(rootAcl, { [CONTENT_TYPE]: TEXT_TURTLE });
const metadata = new RepresentationMetadata(rootAcl, TEXT_TURTLE);
this.logger.debug(`Installing root ACL document at ${rootAcl.path}`);
await this.store.setRepresentation(
rootAcl,