refactor: remove unused auth service and clean up server-side code

This commit is contained in:
Mauricio Siu
2025-02-22 18:03:12 -06:00
parent 81a881b07e
commit 1a415b96c9
201 changed files with 434 additions and 1035 deletions

View File

@@ -1,38 +1,10 @@
import { db } from "@dokploy/server/db";
import { type users_temp, member } from "@dokploy/server/db/schema";
import { member, type users_temp } from "@dokploy/server/db/schema";
import { TRPCError } from "@trpc/server";
import { and, eq } from "drizzle-orm";
import { findUserById } from "./admin";
export type User = typeof users_temp.$inferSelect;
// export const findUserById = async (userId: string) => {
// // const userR = await db.query.user.findFirst({
// // where: eq(user.userId, userId),
// // });
// // if (!userR) {
// // throw new TRPCError({
// // code: "NOT_FOUND",
// // message: "User not found",
// // });
// // }
// // return user;
// };
export const findUserByAuthId = async (authId: string) => {
// const userR = await db.query.user.findFirst({
// where: eq(user.id, authId),
// with: {},
// });
// if (!userR) {
// throw new TRPCError({
// code: "NOT_FOUND",
// message: "User not found",
// });
// }
// return userR;
};
export const addNewProject = async (
userId: string,
projectId: string,