(value: string)
| 37 | }; |
| 38 | |
| 39 | const parseStatus = (value: string): JoinRequestStatus => { |
| 40 | return value === JOIN_REQUEST_STATUS.pending || |
| 41 | value === JOIN_REQUEST_STATUS.approved || |
| 42 | value === JOIN_REQUEST_STATUS.denied |
| 43 | ? value |
| 44 | : JOIN_REQUEST_STATUS.pending; |
| 45 | }; |
| 46 | |
| 47 | export const toJoinRequest = ( |
| 48 | row: typeof accountJoinRequests.$inferSelect |
| 49 | ): IJoinRequest => ({ |
| 50 | id: row.id, |
| 51 | accountId: row.accountId, |
| 52 | userId: row.userId, |