mirror of
https://github.com/fastapi/full-stack-fastapi-template.git
synced 2026-10-13 04:39:44 +00:00
⬆️ Bump @hey-api/openapi-ts from 0.73.0 to 0.97.3 and migrate to new client (#2388)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
dependabot[bot]
parent
f8b7926d1c
commit
a8f1ba0e70
@@ -22,13 +22,13 @@ const useAuth = () => {
|
||||
|
||||
const { data: user } = useQuery<UserPublic | null, Error>({
|
||||
queryKey: ["currentUser"],
|
||||
queryFn: UsersService.readUserMe,
|
||||
queryFn: async () => (await UsersService.readUserMe()).data,
|
||||
enabled: isLoggedIn(),
|
||||
})
|
||||
|
||||
const signUpMutation = useMutation({
|
||||
mutationFn: (data: UserRegister) =>
|
||||
UsersService.registerUser({ requestBody: data }),
|
||||
UsersService.registerUser({ body: data }),
|
||||
onSuccess: () => {
|
||||
navigate({ to: "/login" })
|
||||
},
|
||||
@@ -40,9 +40,9 @@ const useAuth = () => {
|
||||
|
||||
const login = async (data: AccessToken) => {
|
||||
const response = await LoginService.loginAccessToken({
|
||||
formData: data,
|
||||
body: data,
|
||||
})
|
||||
localStorage.setItem("access_token", response.access_token)
|
||||
localStorage.setItem("access_token", response.data.access_token)
|
||||
}
|
||||
|
||||
const loginMutation = useMutation({
|
||||
|
||||
Reference in New Issue
Block a user