mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-14 12:14:40 +01:00
docs: update example
This commit is contained in:
@@ -56,7 +56,7 @@ import { z } from 'zod'
|
||||
const posts = ['One', 'Two', 'Three']
|
||||
|
||||
const t = initTRPC.create()
|
||||
const router = t.router({
|
||||
export const router = t.router({
|
||||
post: t.router({
|
||||
add: t.procedure.input(z.string()).mutation(({ input }) => {
|
||||
posts.push(input)
|
||||
|
||||
Reference in New Issue
Block a user