MCPcopy Create free account
hub / github.com/authorizerdev/authorizer / userVerificationHandler

Function userVerificationHandler

web/dashboard/src/pages/Users.tsx:137–155  ·  view source on GitHub ↗
(user: User)

Source from the content-addressed store, hash-verified

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,

Callers 1

UsersFunction · 0.85

Calls 2

getGraphQLErrorMessageFunction · 0.90
updateUserListFunction · 0.85

Tested by

no test coverage detected