Skip to content

Commit

Permalink
resolve build error
Browse files Browse the repository at this point in the history
  • Loading branch information
Aliiiu committed Jan 10, 2025
1 parent 6664b15 commit 1a4c149
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/schema/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,21 @@ export const Wiki = z
[LinkedWikiKey.Enum.speakers]: val?.[LinkedWikiKey.Enum.speakers] ?? [],
})),
})
.refine(isEventWikiValid, {
message:
"Event wikis must have an event link citation and at least one event date",
path: ["events"],
});

.refine(
(arg) =>
isEventWikiValid(
arg as {
tags: { id: string }[];
metadata: { id: string; value: string }[];
events: unknown[];
},
),
{
message:
"Event wikis must have an event link citation and at least one event date",
path: ["events"],
},
);
export type Wiki = z.infer<typeof Wiki>;

export const Reference = z.object({
Expand Down

0 comments on commit 1a4c149

Please sign in to comment.