mirror of
https://github.com/andwati/dokploy.git
synced 2026-10-31 17:22:16 +00:00
refactor(user): remove getTrustedOrigins query from user router
- Eliminated the getTrustedOrigins query from the user router to streamline the API and improve code maintainability.
This commit is contained in:
@@ -118,14 +118,6 @@ export const userRouter = createTRPCRouter({
|
|||||||
|
|
||||||
return memberResult;
|
return memberResult;
|
||||||
}),
|
}),
|
||||||
getTrustedOrigins: protectedProcedure.query(async ({ ctx }) => {
|
|
||||||
const memberResult = await db.query.member.findFirst({
|
|
||||||
where: and(
|
|
||||||
eq(member.organizationId, ctx.session?.activeOrganizationId || ""),
|
|
||||||
),
|
|
||||||
});
|
|
||||||
return memberResult?.user?.trustedOrigins ?? [];
|
|
||||||
}),
|
|
||||||
haveRootAccess: protectedProcedure.query(async ({ ctx }) => {
|
haveRootAccess: protectedProcedure.query(async ({ ctx }) => {
|
||||||
if (!IS_CLOUD) {
|
if (!IS_CLOUD) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user