Fix time display, fix file attachments not working properly after sending without refresh

This commit is contained in:
2025-08-21 14:06:37 +02:00
parent f2ac7d7209
commit 4dcacd0d73
7 changed files with 142 additions and 28 deletions

View File

@@ -18,7 +18,16 @@ export const uploadFile = async (req: Request, res: Response) => {
const result = await FileService.uploadFile(channelId, messageId, filePath, fileType!, fileSize!, originalName!);
logger.info(`File ${originalName} uploaded to message ${messageId} as ${filePath}`);
res.json({ id: result.lastInsertRowid, channelId, messageId, filePath, fileType });
res.json({
id: result.lastInsertRowid,
channel_id: parseInt(channelId),
message_id: parseInt(messageId),
file_path: filePath,
file_type: fileType,
file_size: fileSize,
original_name: originalName,
created_at: new Date().toISOString()
});
}