mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 19:10:12 +08:00
feat: init trpc
This commit is contained in:
1 parent
8cc006e3a4
commit
6326b84a60
6 files changed
+44
-1
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import { router, publicProcedure } from '../trpc.js'
|
||||
|
||||
export const appRouter = router({
|
||||
userList: publicProcedure.query(async () => {
|
||||
// Retrieve users from a datasource, this is an imaginary database
|
||||
return 'hello'
|
||||
}),
|
||||
})
|
||||
// Export type router type signature,
|
||||
// NOT the router itself.
|
||||
export type AppRouter = typeof appRouter
|
||||
Reference in new issue
Block a user