update example

This commit is contained in:
wobsoriano
2022-12-18 21:42:56 -08:00
parent 0f00e561a1
commit c14a154723

View File

@@ -1,12 +1,11 @@
<script setup lang="ts">
const { $client } = useNuxtApp()
const { mutate } = $client.todo.addTodo.useMutation()
const addTodo = async () => {
const title = Math.random().toString(36).slice(2, 7)
try {
const x = await mutate({
const x = await $client.todo.addTodo.mutate({
id: Date.now(),
userId: 69,
title,