Some changes in manage.ts --> 3 user.ts, song.ts, songbook.ts
Aufspaltung auf 3 Dateien, aber man muss noch weiter arbeiten (Task: Von better-sqlite3 --> ORM)
This commit is contained in:
1 parent
d395308c6d
commit
d03ff9d26d
7 files changed
+242
-50
No files matched your search
+5
-5
@@ -7,12 +7,12 @@ export async function initDB() {
|
||||
if (count === 0) {
|
||||
await prisma.user.create({
|
||||
data: {
|
||||
username: process.env.ADMIN_USERNAME!,
|
||||
password: await argon2.hash(process.env.ADMIN_PASSWORD!),
|
||||
role: 'admin',
|
||||
name: 'Admin'
|
||||
username: process.env.ADMIN_USERNAME!,
|
||||
password: await argon2.hash(process.env.ADMIN_PASSWORD!),
|
||||
role: 'admin',
|
||||
name: 'Admin'
|
||||
}
|
||||
})
|
||||
console.log('Admin-User angelegt.')
|
||||
console.log('Created admin user')
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user