chat WIP
This commit is contained in:
22
server/modules/chat/index.ts
Normal file
22
server/modules/chat/index.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import client from '../../prisma/client.ts'
|
||||
|
||||
export async function chatInit() {
|
||||
const existing = client.chatChannel.findFirst({
|
||||
where: {
|
||||
id: 0,
|
||||
},
|
||||
})
|
||||
|
||||
if (!existing) {
|
||||
await client.chatChannel.create({
|
||||
create: {
|
||||
id: 0,
|
||||
name: 'Main channel',
|
||||
},
|
||||
update: null,
|
||||
where: {
|
||||
id: 0,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user