mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: remove unused auth service and clean up server-side code
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user