pl-api: fix instance v1 to v2 conversion

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-09-25 19:11:02 +02:00
parent 0c69c608c7
commit 1433d332e1

View file

@ -298,7 +298,7 @@ const instanceSchema = z.preprocess((data: any) => {
if (data.domain) return { account_domain: data.domain, ...data, api_versions: apiVersions };
return instanceV1ToV2({ api_versions: apiVersions, ...data });
return instanceV1ToV2({ ...data, api_versions: apiVersions });
}, coerceObject({
account_domain: z.string().catch(''),
api_versions: z.record(z.number()).catch({}),