Skip to content

Commit e2fc767

Browse files
committed
Hard code variant map DO NOT COMMIT
1 parent f0ce917 commit e2fc767

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • lambdas/supplier-allocator/src/config

lambdas/supplier-allocator/src/config/env.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ export type LetterVariant = z.infer<typeof LetterVariantSchema>;
1212

1313
const EnvVarsSchema = z.object({
1414
PINO_LOG_LEVEL: z.coerce.string().optional(),
15-
VARIANT_MAP: z.string().transform((str, _) => {
16-
const parsed = JSON.parse(str);
17-
return LetterVariantSchema.parse(parsed);
18-
}),
15+
VARIANT_MAP: {
16+
lv1: { supplierId: "supplier1", specId: "spec1", priority: 10 },
17+
lv2: { supplierId: "supplier1", specId: "spec2", priority: 10 },
18+
lv3: { supplierId: "supplier2", specId: "spec3", priority: 10 },
19+
},
1920
});
2021

2122
export type EnvVars = z.infer<typeof EnvVarsSchema>;

0 commit comments

Comments
 (0)