(user: User)
| 135 | }; |
| 136 | |
| 137 | const userVerificationHandler = async (user: User) => { |
| 138 | const { id, email, phone_number } = user; |
| 139 | let params: Record<string, unknown> = {}; |
| 140 | if (email) { |
| 141 | params = { id, email, email_verified: true }; |
| 142 | } |
| 143 | if (phone_number) { |
| 144 | params = { id, phone_number, phone_number_verified: true }; |
| 145 | } |
| 146 | const res = await client.mutation(UpdateUser, { params }).toPromise(); |
| 147 | if (res.error) { |
| 148 | toast.error( |
| 149 | getGraphQLErrorMessage(res.error, 'User verification failed'), |
| 150 | ); |
| 151 | } else if (res.data?._update_user?.id) { |
| 152 | toast.success('User verification successful'); |
| 153 | } |
| 154 | updateUserList(); |
| 155 | }; |
| 156 | |
| 157 | const updateAccessHandler = async ( |
| 158 | id: string, |
no test coverage detected