mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-08 15:35:23 +02:00
refactor: rename findAdmin to findOwner across multiple files
- Updated the function name from findAdmin to findOwner in reset-2fa.ts, reset-password.ts, user.ts, admin.ts, and access-log handler.ts to reflect the change in role terminology. - Adjusted related logic to ensure consistency in user role handling.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { findAdmin } from "@dokploy/server";
|
||||
import { findOwner } from "@dokploy/server";
|
||||
import { db } from "@dokploy/server/db";
|
||||
import { users_temp } from "@dokploy/server/db/schema";
|
||||
import { eq } from "drizzle-orm";
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
const result = await findAdmin();
|
||||
const result = await findOwner();
|
||||
|
||||
const update = await db
|
||||
.update(users_temp)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { findAdmin } from "@dokploy/server";
|
||||
import { findOwner } from "@dokploy/server";
|
||||
import { generateRandomPassword } from "@dokploy/server";
|
||||
import { db } from "@dokploy/server/db";
|
||||
import { account } from "@dokploy/server/db/schema";
|
||||
@@ -8,7 +8,7 @@ import { eq } from "drizzle-orm";
|
||||
try {
|
||||
const randomPassword = await generateRandomPassword();
|
||||
|
||||
const result = await findAdmin();
|
||||
const result = await findOwner();
|
||||
|
||||
const update = await db
|
||||
.update(account)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
IS_CLOUD,
|
||||
createApiKey,
|
||||
findAdmin,
|
||||
findOwner,
|
||||
findNotificationById,
|
||||
findOrganizationById,
|
||||
findUserById,
|
||||
@@ -410,11 +410,11 @@ export const userRouter = createTRPCRouter({
|
||||
});
|
||||
}
|
||||
|
||||
const admin = await findAdmin();
|
||||
const owner = await findOwner();
|
||||
const host =
|
||||
process.env.NODE_ENV === "development"
|
||||
? "http://localhost:3000"
|
||||
: admin.user.host;
|
||||
: owner.user.host;
|
||||
const inviteLink = `${host}/invitation?token=${input.invitationId}`;
|
||||
|
||||
const organization = await findOrganizationById(
|
||||
|
||||
Reference in New Issue
Block a user