({
email,
password,
authorization,
}: {
email: string;
password: string;
authorization: AuthorizationRequest;
})
| 198 | }; |
| 199 | |
| 200 | const loginFn = async ({ |
| 201 | email, |
| 202 | password, |
| 203 | authorization, |
| 204 | }: { |
| 205 | email: string; |
| 206 | password: string; |
| 207 | authorization: AuthorizationRequest; |
| 208 | }) => { |
| 209 | await API.login(email, password); |
| 210 | const [user, permissions] = await Promise.all([ |
| 211 | API.getAuthenticatedUser(), |
| 212 | API.checkAuthorization(authorization), |
| 213 | ]); |
| 214 | return { |
| 215 | user, |
| 216 | permissions, |
| 217 | }; |
| 218 | }; |
| 219 | |
| 220 | export const logout = (queryClient: QueryClient): MutationOptions => { |
| 221 | return { |
no test coverage detected