From b85080f760e422861bda4508ff2dc3ba4a518c44 Mon Sep 17 00:00:00 2001 From: haoziqaq <357229046@qq.com> Date: Wed, 25 Sep 2024 03:21:13 +0800 Subject: [PATCH] docs: update readme --- README.md | 8 ++++---- README.zh-CN.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 06f1709..16bfbd6 100644 --- a/README.md +++ b/README.md @@ -470,16 +470,16 @@ const [user, getUser] = apiGetUser.use>({ pathParams: () => ({ id: route.params.id }), }) -async function handleCreate(payload: CreateUser) { - const { success } = await apiCreateUser.load(payload) +async function handleCreate(params: CreateUser) { + const { success } = await apiCreateUser.load(params) if (success) { getUsers() } } -async function handleUpdate(payload: UpdateUser, id: string) { - const { success } = await apiUpdateUser.load(payload, { id }) +async function handleUpdate(params: UpdateUser, id: string) { + const { success } = await apiUpdateUser.load(params, { id }) if (success) { getUsers() diff --git a/README.zh-CN.md b/README.zh-CN.md index f037331..7fe9bc7 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -470,16 +470,16 @@ const [user, getUser] = apiGetUser.use>({ pathParams: () => ({ id: route.params.id }), }) -async function handleCreate(payload: CreateUser) { - const { success } = await apiCreateUser.load(payload) +async function handleCreate(params: CreateUser) { + const { success } = await apiCreateUser.load(params) if (success) { getUsers() } } -async function handleUpdate(payload: UpdateUser, id: string) { - const { success } = await apiUpdateUser.load(payload, { id }) +async function handleUpdate(params: UpdateUser, id: string) { + const { success } = await apiUpdateUser.load(params, { id }) if (success) { getUsers()