Skip to content

Commit fc21698

Browse files
committed
refactor: remove unused functions
1 parent 0fbcda3 commit fc21698

File tree

4 files changed

+2
-16
lines changed

4 files changed

+2
-16
lines changed

api/src/core/adapters/dbApi/kysely/createPgAgentRepository.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,3 @@ const makeGetAgentBuilder = (db: Kysely<Database>) =>
109109
.as("referentsDeclarations")
110110
])
111111
.groupBy("a.id");
112-
113-
export const makeGetAgentIdByEmail = async (db: Kysely<Database>): Promise<Record<string, number>> => {
114-
const agents = await db.selectFrom("agents").select(["email", "id"]).execute();
115-
return agents.reduce((acc, agent) => ({ ...acc, [agent.email]: agent.id }), {});
116-
};

api/src/core/adapters/hal/HalAPI/getHalSoftware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const halSoftwareFieldsToReturn: (keyof HAL.API.Software)[] = [
3333
"label_xml"
3434
];
3535

36-
export const halSoftwareFieldsToReturnAsString = halSoftwareFieldsToReturn.join(",");
36+
const halSoftwareFieldsToReturnAsString = halSoftwareFieldsToReturn.join(",");
3737

3838
export async function fetchHalSoftwareById(halDocid: string): Promise<HAL.API.Software | undefined> {
3939
const res = await fetch(

api/src/core/adapters/hal/getHalSoftwareOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Source } from "../../usecases/readWriteSillData";
77
import { HAL } from "./HalAPI/types/HAL";
88
import { halAPIGateway } from "./HalAPI";
99

10-
export const rawHalSoftwareToExternalOption =
10+
const rawHalSoftwareToExternalOption =
1111
({ language, source }: { language: Language; source: Source }) =>
1212
(halSoftware: HAL.API.Software): SoftwareExternalDataOption => {
1313
const enLabel = halSoftware?.en_title_s?.[0] ?? halSoftware?.title_s?.[0] ?? "-";

api/src/core/ports/GetSoftwareExternalData.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,3 @@ const zLanguage = z.union([z.literal("en"), z.literal("fr")]);
5555

5656
assert<Equals<Got, Expected>>();
5757
}
58-
59-
export const zLocalizedString = z.union([z.string(), z.record(zLanguage, z.string())]);
60-
61-
{
62-
type Got = ReturnType<(typeof zLocalizedString)["parse"]>;
63-
type Expected = LocalizedString;
64-
65-
assert<Equals<Got, Expected>>();
66-
}

0 commit comments

Comments
 (0)