brutalism design
This commit is contained in:
@@ -41,7 +41,7 @@ const plugin: FastifyPluginAsyncTypebox = async (fastify) => {
|
||||
const channel = await fastify.prisma.channel.create({
|
||||
data: {
|
||||
name: req.body.name,
|
||||
ownerId: user.id,
|
||||
ownerUsername: user.username,
|
||||
persistent: req.body.persistent,
|
||||
},
|
||||
})
|
||||
@@ -73,7 +73,7 @@ const plugin: FastifyPluginAsyncTypebox = async (fastify) => {
|
||||
|
||||
try {
|
||||
const channel = await fastify.prisma.channel.delete({
|
||||
where: { id: req.params.id, ownerId: user.id },
|
||||
where: { id: req.params.id, ownerUsername: user.username },
|
||||
})
|
||||
|
||||
fastify.bus.emit('channel:removed', channel)
|
||||
|
||||
Reference in New Issue
Block a user