Skip to content

Commit

Permalink
Merge pull request #8794 from hicommonwealth/tim/fix-comments-schema
Browse files Browse the repository at this point in the history
Comments schema fix
  • Loading branch information
ilijabojanovic authored Aug 8, 2024
2 parents 29d3c73 + bad42cf commit b2d48f0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions libs/schemas/src/entities/comment.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export const Comment = z.object({
version_history: z.array(z.string()).optional(),
version_history_updated: z.boolean().optional(),

canvas_signed_data: z.string(),
canvas_hash: z.string(),
canvas_signed_data: z.string().nullish(),
canvas_hash: z.string().nullish(),

created_by: z.string().nullish(),
created_at: zDate.nullish(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,7 @@ export async function __createThreadComment(
address_id: address.id,
community_id: thread.community_id,
parent_id: null,
// @ts-expect-error <StrictNullChecks>
canvas_signed_data: canvasSignedData,
// @ts-expect-error <StrictNullChecks>
canvas_hash: canvasHash,
discord_meta: discordMeta,
reaction_count: 0,
Expand Down
2 changes: 0 additions & 2 deletions packages/commonwealth/server/util/sanitizeDeletedComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ export function sanitizeDeletedComment(
is_user_default: false,
},
address_id: 0,
// @ts-expect-error <StrictNullChecks>
canvas_hash: null,
// @ts-expect-error <StrictNullChecks>
canvas_signed_data: null,
plaintext: '[deleted]',
text: '[deleted]',
Expand Down

0 comments on commit b2d48f0

Please sign in to comment.