[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot] 2025-06-22 16:00:36 +00:00 committed by GitHub
parent 6290c217f1
commit 412bb9e874
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,24 +4,24 @@ import { users_temp } from "@dokploy/server/db/schema";
import { eq } from "drizzle-orm"; import { eq } from "drizzle-orm";
(async () => { (async () => {
try { try {
const result = await findAdmin(); const result = await findAdmin();
const update = await db const update = await db
.update(users_temp) .update(users_temp)
.set({ .set({
twoFactorEnabled: false, twoFactorEnabled: false,
}) })
.where(eq(users_temp.id, result.userId)); .where(eq(users_temp.id, result.userId));
if (update) { if (update) {
console.log("2FA reset successful"); console.log("2FA reset successful");
} else { } else {
console.log("Password reset failed"); console.log("Password reset failed");
} }
process.exit(0); process.exit(0);
} catch (error) { } catch (error) {
console.log("Error resetting 2FA", error); console.log("Error resetting 2FA", error);
} }
})(); })();