From f4c8c4ba863cb386f5f74fac7508dbbdc5fe6820 Mon Sep 17 00:00:00 2001 From: flipsimon <28535045+flipsimon@users.noreply.github.com> Date: Mon, 11 Sep 2023 12:40:57 +0200 Subject: [PATCH] fix: revision part in cba urls --- packages/repco-core/src/datasource.ts | 4 ++-- packages/repco-core/src/datasources/cba.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/repco-core/src/datasource.ts b/packages/repco-core/src/datasource.ts index 088f059f..a46cd054 100644 --- a/packages/repco-core/src/datasource.ts +++ b/packages/repco-core/src/datasource.ts @@ -81,9 +81,9 @@ export interface DataSource { fetchByUri(uri: string): Promise fetchByUriBatch(uris: string[]): Promise /** - * Determines whether the data source is capable of fetching records by UID. + * Determines whether the data source is capable of fetching a particular uri * - * @param uid - The UID of the record to fetch. + * @param uri The uri in question * @returns `true` if the data source can fetch the record, `false` otherwise. */ canFetchUri(uri: string): boolean diff --git a/packages/repco-core/src/datasources/cba.ts b/packages/repco-core/src/datasources/cba.ts index c0dc757a..741d508d 100644 --- a/packages/repco-core/src/datasources/cba.ts +++ b/packages/repco-core/src/datasources/cba.ts @@ -375,7 +375,7 @@ export class CbaDataSource implements DataSource { type: parts[1], id: parts[2], } - } else if (parts[1] === 'r') { + } else if (parts[0] === 'r') { if (parts.length !== 4) return null return { kind: 'revision',