feat: add admin panel, Openinary media integration and standardized footer backlink

This commit is contained in:
mstfyldz
2026-08-23 01:40:48 +03:00
parent 17915cd3d5
commit b312bc5593
29 changed files with 1405 additions and 41 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)
})