Modification de l'api messages

This commit is contained in:
Bilal Dieumegard 2024-12-17 21:30:07 +01:00
parent 15b0c91992
commit 0fbbecc1d1

View file

@ -140,7 +140,6 @@ export async function POST({ params, request }) {
let channels = cachedChannels ? JSON.parse(cachedChannels) : []; let channels = cachedChannels ? JSON.parse(cachedChannels) : [];
let channel = channels.find((c) => c.id === channelId); let channel = channels.find((c) => c.id === channelId);
if(channel){ if(channel){
console.log('channel found')
channel.lastMessage = { channel.lastMessage = {
id: newMessage.id, id: newMessage.id,
text: newMessage.text, text: newMessage.text,