mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Added resourceExists method to ResourceStore
* feat: added resourceExists method to ResourceStore * Merge remote-tracking branch 'origin/main' into feat/add-resourceExists-method-to-ResourceStore * fix: adapted to review * fix: adapted to review
This commit is contained in:
committed by
GitHub
parent
e5b7d99da4
commit
b3f292d718
@@ -1,6 +1,5 @@
|
||||
import type { Representation } from '../../ldp/representation/Representation';
|
||||
import type { ResourceIdentifier } from '../../ldp/representation/ResourceIdentifier';
|
||||
import { containsResource } from '../../storage/StoreUtil';
|
||||
import type { ResourceStore } from '../ResourceStore';
|
||||
import type { PreferenceSupport } from './PreferenceSupport';
|
||||
import { RouterRule } from './RouterRule';
|
||||
@@ -40,8 +39,7 @@ export class ConvertingRouterRule extends RouterRule {
|
||||
entry.supportChecker.supports({ identifier, representation }));
|
||||
} else {
|
||||
// No content-type given so we can only check if one of the stores has data for the identifier
|
||||
store = await this.findStore(async(entry): Promise<boolean> =>
|
||||
containsResource(entry.store, input.identifier));
|
||||
store = await this.findStore(async(entry): Promise<boolean> => entry.store.resourceExists(input.identifier));
|
||||
}
|
||||
return store;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user