Skip to content

Commit

Permalink
🐞fix: type output validation
Browse files Browse the repository at this point in the history
  • Loading branch information
blinko-space committed Nov 11, 2024
1 parent 2b812d9 commit 631199a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/server/routers/public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export const publicRouter = router({
try {
const result: Metadata = await unfurl(input.url)
return {
title: result.title ?? '',
favicon: result.favicon ?? '',
description: result.description ?? ''
title: result?.title ?? '',
favicon: result?.favicon ?? '',
description: result?.description ?? ''
}
} catch (error) {
return null
Expand Down
8 changes: 4 additions & 4 deletions src/server/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ export const ZConfigSchema = z.object({
isAutoArchived: z.boolean().optional(),
autoArchivedDays: z.number().optional(),
isUseAI: z.boolean().optional(),
aiModelProvider: z.enum(['OpenAI']).optional(),
aiApiKey: z.string().optional(),
aiApiEndpoint: z.string().optional(),
aiModel: z.string().optional(),
aiModelProvider: z.any(),
aiApiKey: z.any(),
aiApiEndpoint: z.any(),
aiModel: z.any(),
isHiddenMobileBar: z.boolean().optional(),
});

Expand Down

0 comments on commit 631199a

Please sign in to comment.