Files
chad/server/modules/chat/index.ts
Ivan Grachyov ca773a56c6 chat WIP
2025-12-26 23:36:21 +03:00

23 lines
368 B
TypeScript

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,
},
})
}
}