a bunch of bug fixes and improvements

This commit is contained in:
Zoe
2023-04-28 00:28:37 -05:00
parent a7c91b382a
commit b88b3207b3
27 changed files with 494 additions and 184 deletions

View File

@@ -21,7 +21,7 @@ export default defineEventHandler(async (event) => {
const channelId = event.context.params.id;
if (!req || !channelId) {
if (!req.body || !channelId || !req.body.trim()) {
throw createError({
statusCode: 400,
statusMessage: 'A body is required to send a message.',
@@ -166,6 +166,7 @@ export default defineEventHandler(async (event) => {
select: {
id: true,
body: true,
createdAt: true,
creator: {
select: {
id: true,