Added SSE function and add readAt for notification
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { auth } from '@lib/auth';
|
||||
import { PrismaPg } from '@prisma/adapter-pg';
|
||||
import { PrismaClient } from '../src/generated/prisma/client.js';
|
||||
import { settingsData } from './data.js';
|
||||
import { settingsData, userData } from './data.js';
|
||||
|
||||
const adapter = new PrismaPg({
|
||||
connectionString: process.env.DATABASE_URL!,
|
||||
@@ -32,6 +32,19 @@ async function main() {
|
||||
}
|
||||
|
||||
console.log('---------------Created admin user-----------------');
|
||||
|
||||
userData.map(async (user) => {
|
||||
await auth.api.createUser({
|
||||
body: {
|
||||
email: user.email,
|
||||
password: 'Th@m!S@m!040390',
|
||||
name: user.name,
|
||||
role: 'user',
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
console.log('---------------Created member user-----------------');
|
||||
await prisma.setting.deleteMany();
|
||||
|
||||
const listSettings = [
|
||||
|
||||
Reference in New Issue
Block a user