mirror of
https://github.com/fastapi/full-stack-fastapi-template.git
synced 2026-11-03 20:36:27 +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:
@@ -11,7 +11,8 @@ import useAuth from "@/hooks/useAuth"
|
||||
|
||||
function getUsersQueryOptions() {
|
||||
return {
|
||||
queryFn: () => UsersService.readUsers({ skip: 0, limit: 100 }),
|
||||
queryFn: async () =>
|
||||
(await UsersService.readUsers({ query: { skip: 0, limit: 100 } })).data,
|
||||
queryKey: ["users"],
|
||||
}
|
||||
}
|
||||
@@ -19,7 +20,7 @@ function getUsersQueryOptions() {
|
||||
export const Route = createFileRoute("/_layout/admin")({
|
||||
component: Admin,
|
||||
beforeLoad: async () => {
|
||||
const user = await UsersService.readUserMe()
|
||||
const { data: user } = await UsersService.readUserMe()
|
||||
if (!user.is_superuser) {
|
||||
throw redirect({
|
||||
to: "/",
|
||||
|
||||
@@ -11,7 +11,8 @@ import PendingItems from "@/components/Pending/PendingItems"
|
||||
|
||||
function getItemsQueryOptions() {
|
||||
return {
|
||||
queryFn: () => ItemsService.readItems({ skip: 0, limit: 100 }),
|
||||
queryFn: async () =>
|
||||
(await ItemsService.readItems({ query: { skip: 0, limit: 100 } })).data,
|
||||
queryKey: ["items"],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ function RecoverPassword() {
|
||||
|
||||
const recoverPassword = async (data: FormData) => {
|
||||
await LoginService.recoverPassword({
|
||||
email: data.email,
|
||||
path: { email: data.email },
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ function ResetPassword() {
|
||||
|
||||
const mutation = useMutation({
|
||||
mutationFn: (data: { new_password: string; token: string }) =>
|
||||
LoginService.resetPassword({ requestBody: data }),
|
||||
LoginService.resetPassword({ body: data }),
|
||||
onSuccess: () => {
|
||||
showSuccessToast("Password updated successfully")
|
||||
form.reset()
|
||||
|
||||
Reference in New Issue
Block a user