Skip to content

Commit f633e30

Browse files
committed
feat: add cnll to the resolver
refs: #365
1 parent 7f766d5 commit f633e30

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

api/src/core/adapters/CNLL/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { SecondarySourceGateway } from "../../ports/SourceGateway";
2+
import { getCNLLSoftwareExternalData } from "./getExternalData";
3+
4+
export const cNLLSourceGateway: SecondarySourceGateway = {
5+
sourceType: "ComptoirDuLibre",
6+
sourceProfile: "Secondary",
7+
softwareExternalData: {
8+
getById: getCNLLSoftwareExternalData
9+
}
10+
};

api/src/core/adapters/resolveAdapter.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { DatabaseDataType } from "../ports/DbApiV2";
33
import { halSourceGateway } from "./hal";
44
import { wikidataSourceGateway } from "./wikidata";
55
import { comptoirDuLibreSourceGateway } from "./comptoirDuLibre";
6+
import { cNLLSourceGateway } from "./CNLL";
67

78
export const resolveAdapterFromSource = (
89
source: DatabaseDataType.SourceRow
@@ -14,6 +15,8 @@ export const resolveAdapterFromSource = (
1415
return wikidataSourceGateway;
1516
case "ComptoirDuLibre":
1617
return comptoirDuLibreSourceGateway;
18+
case "CNLL":
19+
return cNLLSourceGateway;
1720
default:
1821
const unreachableCase: never = source.kind;
1922
throw new Error(`Unreachable case: ${unreachableCase}`);

0 commit comments

Comments
 (0)