Allow separate from and to emails
All checks were successful
Publish Docker Image / Publish Docker Image (push) Successful in 10s

This commit is contained in:
Ahmed Al-Taiar
2024-10-16 21:45:55 -04:00
parent 6540329f36
commit 7973663b2a
7 changed files with 21 additions and 3 deletions

View File

@ -9,7 +9,7 @@ export default async () => {
try {
const admin = {
username: 'admin',
email: process.env.GMAIL,
email: process.env.EMAIL_TO,
password: process.env.SMTP_PASSWORD,
}
@ -17,7 +17,7 @@ export default async () => {
const existingAdmin = await db.user.findFirst({
where: {
email: admin.email,
username: admin.username,
},
})
@ -30,6 +30,14 @@ export default async () => {
salt,
},
})
else
await db.user.update({
where: { id: existingAdmin.id },
data: {
username: admin.username,
email: admin.email,
},
})
const titles = await db.titles.findFirst()