287
288
private async getResourceData(collection: string | undefined, resource: string, ref?: string, headers: IHeaders = {}): Promise<IRequestContext> {
289
>
const collectionData = collection ? this.collections.get(collection) : this.data;
userDataSyncClient.ts
290
>
if (!collectionData) {
291
return this.toResponse(501);
292
}
294
>
const resourceKey = ALL_SERVER_RESOURCES.find(key => key === resource);
295
>
if (resourceKey) {
296
>
const data = collectionData.get(resourceKey);
297
>
if (ref && data?.ref !== ref) {
298
return this.toResponse(404);
299
}