Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
haoziqaq committed Sep 24, 2024
1 parent 3f8d0b1 commit b85080f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,16 +470,16 @@ const [user, getUser] = apiGetUser.use<Response<User>>({
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()
Expand Down
8 changes: 4 additions & 4 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,16 +470,16 @@ const [user, getUser] = apiGetUser.use<Response<User>>({
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()
Expand Down

0 comments on commit b85080f

Please sign in to comment.