15 lines
334 B
TypeScript
15 lines
334 B
TypeScript
import { createTRPCRouter, protectedProcedure } from "@/server/api/trpc";
|
|
|
|
export const userRouter = createTRPCRouter({
|
|
getAll: protectedProcedure.query(
|
|
async ({ ctx }) =>
|
|
await ctx.db.query.users.findMany({
|
|
columns: {
|
|
id: true,
|
|
name: true,
|
|
image: true,
|
|
},
|
|
})
|
|
),
|
|
});
|