@ -10,7 +10,7 @@ export type ParsedCreateCommentInput = {
parentId : number | null ;
guestDisplayName? : string ;
guestEmail? : string ;
guestIsAnonymous : boolean ;
guestIsAnonymous? : boolean ;
body : string ;
} ;
@ -22,7 +22,7 @@ export function parsePublicPostCreateCommentBody(body: CreateCommentRequestBody)
parentId : parseParentId ( body . parentId ) ,
guestDisplayName : typeof body . guestDisplayName === "string" ? body.guestDisplayName : undefined ,
guestEmail : typeof body . guestEmail === "string" ? body.guestEmail : undefined ,
guestIsAnonymous : body.guestIsAnonymous === true ,
guestIsAnonymous : typeof body . guestIsAnonymous === "boolean" ? body.guestIsAnonymous : undefined ,
body : body.body ,
} ;
}
@ -35,7 +35,7 @@ export function parseUnlistedCreateCommentBody(body: CreateCommentRequestBody):
parentId : parseParentId ( body . parentId ) ,
guestDisplayName : typeof body . guestDisplayName === "string" ? body.guestDisplayName : undefined ,
guestEmail : typeof body . guestEmail === "string" ? body.guestEmail : undefined ,
guestIsAnonymous : body.guestIsAnonymous === true ,
guestIsAnonymous : typeof body . guestIsAnonymous === "boolean" ? body.guestIsAnonymous : undefined ,
body : body.body ,
} ;
}