Imrpove chat with gifs, videos, music player, redesigns and improved filesharing errors

This commit is contained in:
2026-03-06 04:47:07 +01:00
parent 2d84fbd91a
commit fe2347b54e
65 changed files with 3593 additions and 1030 deletions

View File

@@ -66,13 +66,14 @@ router.post('/', async (req, res) => {
router.put('/:id', async (req, res) => {
const { id } = req.params;
const { ownerId, ...updates } = req.body;
const { currentOwnerId, ...updates } = req.body;
const existing = await getServerById(id);
const authenticatedOwnerId = currentOwnerId ?? req.body.ownerId;
if (!existing)
return res.status(404).json({ error: 'Server not found' });
if (existing.ownerId !== ownerId)
if (existing.ownerId !== authenticatedOwnerId)
return res.status(403).json({ error: 'Not authorized' });
const server: ServerPayload = { ...existing, ...updates, lastSeen: Date.now() };