File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -82,14 +82,10 @@ const approvalStatusSchema = z.union([
8282 z . literal ( COMMENT_STATUS . TO_REVIEW ) ,
8383 z . literal ( COMMENT_STATUS . UNKNOWN ) ,
8484] ) ;
85- const reportReasonUnion = z . union ( [
86- z . literal ( 'BAD_LANGUAGE' ) ,
87- z . literal ( 'DISCRIMINATION' ) ,
88- z . literal ( 'OTHER' ) ,
89- ] ) ;
85+
9086const commentReportSchema = z . object ( {
9187 id : z . number ( ) ,
92- reason : reportReasonUnion ,
88+ reason : z . string ( ) . optional ( ) . nullable ( ) ,
9389 content : z . string ( ) ,
9490 resolved : z . boolean ( ) ,
9591 createdAt : z . string ( ) ,
@@ -200,7 +196,7 @@ export const reportSchema = z.object({
200196 content : z . string ( ) ,
201197 id : z . number ( ) ,
202198 approvalStatus : approvalStatusSchema . nullable ( ) . optional ( ) ,
203- reason : reportReasonUnion ,
199+ reason : z . string ( ) . optional ( ) . nullable ( ) ,
204200 reports : z . array ( z . unknown ( ) ) ,
205201 resolved : z . boolean ( ) . optional ( ) ,
206202 updatedAt : z . string ( ) . nullable ( ) ,
You can’t perform that action at this time.
0 commit comments