mirror of
https://github.com/LukeHagar/dokploy.git
synced 2025-12-09 20:37:45 +00:00
refactor: update temps
This commit is contained in:
@@ -94,6 +94,10 @@ export default function Home({ IS_CLOUD }: Props) {
|
|||||||
});
|
});
|
||||||
// router.push("/dashboard/projects");
|
// router.push("/dashboard/projects");
|
||||||
// }
|
// }
|
||||||
|
} else {
|
||||||
|
toast.error("Error to sign up", {
|
||||||
|
description: error.message,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(data, error);
|
console.log(data, error);
|
||||||
|
|||||||
@@ -18,15 +18,16 @@ export const auth = betterAuth({
|
|||||||
if (ctx.path.startsWith("/sign-up")) {
|
if (ctx.path.startsWith("/sign-up")) {
|
||||||
const newSession = ctx.context.newSession;
|
const newSession = ctx.context.newSession;
|
||||||
await db
|
await db
|
||||||
.update(schema.user)
|
.update(schema.users_temp)
|
||||||
.set({
|
.set({
|
||||||
role: "admin",
|
role: "admin",
|
||||||
})
|
})
|
||||||
.where(eq(schema.user.id, newSession?.user?.id || ""));
|
.where(eq(schema.users_temp.id, newSession?.user?.id || ""));
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
|
modelName: "users_temp",
|
||||||
additionalFields: {},
|
additionalFields: {},
|
||||||
},
|
},
|
||||||
plugins: [organization()],
|
plugins: [organization()],
|
||||||
|
|||||||
Reference in New Issue
Block a user