fix: Make Patch more consistent with other Representations

This commit is contained in:
Joachim Van Herwegen
2020-08-04 10:05:48 +02:00
parent 14db5fed91
commit d6a35f9954
6 changed files with 24 additions and 18 deletions

View File

@@ -28,7 +28,7 @@ export class SimpleSparqlUpdatePatchHandler extends PatchHandler {
}
public async canHandle(input: {identifier: ResourceIdentifier; patch: SparqlUpdatePatch}): Promise<void> {
if (input.patch.dataType !== 'sparql-algebra' || !input.patch.algebra) {
if (typeof input.patch.algebra !== 'object') {
throw new UnsupportedHttpError('Only SPARQL update patch requests are supported.');
}
}