mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(dokploy): add verification email to cloud version
This commit is contained in:
@@ -50,6 +50,8 @@ export const auth = pgTable("auth", {
|
||||
.$defaultFn(() => new Date().toISOString()),
|
||||
resetPasswordToken: text("resetPasswordToken"),
|
||||
resetPasswordExpiresAt: text("resetPasswordExpiresAt"),
|
||||
confirmationToken: text("confirmationToken"),
|
||||
confirmationExpiresAt: text("confirmationExpiresAt"),
|
||||
});
|
||||
|
||||
export const authRelations = relations(auth, ({ many }) => ({
|
||||
|
||||
@@ -20,7 +20,7 @@ export const createInvitation = async (
|
||||
const result = await tx
|
||||
.insert(auth)
|
||||
.values({
|
||||
email: input.email,
|
||||
email: input.email.toLowerCase(),
|
||||
rol: "user",
|
||||
password: bcrypt.hashSync("01231203012312", 10),
|
||||
})
|
||||
|
||||
@@ -24,7 +24,7 @@ export const createAdmin = async (input: typeof apiCreateAdmin._type) => {
|
||||
const newAuth = await tx
|
||||
.insert(auth)
|
||||
.values({
|
||||
email: input.email,
|
||||
email: input.email.toLowerCase(),
|
||||
password: hashedPassword,
|
||||
rol: "admin",
|
||||
})
|
||||
@@ -93,7 +93,7 @@ export const findAuthByEmail = async (email: string) => {
|
||||
if (!result) {
|
||||
throw new TRPCError({
|
||||
code: "NOT_FOUND",
|
||||
message: "Auth not found",
|
||||
message: "User not found",
|
||||
});
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user