mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
feat: createContext
This commit is contained in:
1 parent
6326b84a60
commit
529869671c
3 files changed
+18
-8
No files matched your search
@@ -1,9 +1,9 @@
|
||||
import { router, publicProcedure } from '../trpc.js'
|
||||
|
||||
export const appRouter = router({
|
||||
userList: publicProcedure.query(async () => {
|
||||
userList: publicProcedure.query(async (opts) => {
|
||||
// Retrieve users from a datasource, this is an imaginary database
|
||||
return 'hello'
|
||||
return opts.ctx
|
||||
}),
|
||||
})
|
||||
// Export type router type signature,
|
||||
|
||||
Reference in new issue
Block a user