removed old stuff

This commit is contained in:
Michael Freno
2026-01-03 09:56:16 -05:00
parent 40c022c420
commit cb33f36377
4 changed files with 23 additions and 157 deletions

View File

@@ -1,34 +0,0 @@
import { wrap } from "@typeschema/valibot";
import { string } from "valibot";
import {
createTRPCRouter,
publicProcedure,
protectedProcedure,
adminProcedure
} from "../utils";
export const exampleRouter = createTRPCRouter({
hello: publicProcedure
.input(wrap(string()))
.query(({ input }) => {
return `Hello ${input}!`;
}),
// Example of a protected procedure (requires authentication)
getProfile: protectedProcedure.query(({ ctx }) => {
return {
userId: ctx.userId,
privilegeLevel: ctx.privilegeLevel,
message: "You are authenticated!",
};
}),
// Example of an admin-only procedure
adminDashboard: adminProcedure.query(({ ctx }) => {
return {
userId: ctx.userId,
message: "Welcome to the admin dashboard!",
isAdmin: true,
};
}),
});