mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: SPARQL PATCH Content Type
This commit is contained in:
committed by
Joachim Van Herwegen
parent
5c6822d468
commit
2a34a430fa
@@ -16,9 +16,8 @@ import type { SparqlUpdatePatch } from './SparqlUpdatePatch';
|
||||
export class SparqlUpdateBodyParser extends BodyParser {
|
||||
protected readonly logger = getLoggerFor(this);
|
||||
|
||||
public async canHandle({ request }: BodyParserArgs): Promise<void> {
|
||||
const contentType = request.headers['content-type'];
|
||||
if (contentType !== APPLICATION_SPARQL_UPDATE) {
|
||||
public async canHandle({ metadata }: BodyParserArgs): Promise<void> {
|
||||
if (metadata.contentType !== APPLICATION_SPARQL_UPDATE) {
|
||||
throw new UnsupportedMediaTypeHttpError('This parser only supports SPARQL UPDATE data.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user