feat: add dynamic site settings, hero media, admin panels, and database integration

This commit is contained in:
mstfyldz
2026-06-05 16:59:05 +03:00
parent 121e127f6b
commit 94182b6bc5
27 changed files with 1894 additions and 52 deletions
+27
View File
@@ -0,0 +1,27 @@
import { PrismaClient } from '@prisma/client'
import bcrypt from 'bcryptjs'
const prisma = new PrismaClient()
async function main() {
const password = await bcrypt.hash('admin123', 10)
const user = await prisma.user.upsert({
where: { username: 'admin' },
update: { password }, // update password if already exists
create: {
username: 'admin',
password,
},
})
console.log('Admin user created:', user.username)
}
main()
.then(async () => {
await prisma.$disconnect()
})
.catch(async (e) => {
console.error(e)
await prisma.$disconnect()
process.exit(1)
})