update: visual update, phone responsive, db migration

This commit is contained in:
Nathan FONTEYNE 2026-07-08 11:50:12 +02:00
parent 73ebd6ad49
commit e97aa2c6c3
16 changed files with 894 additions and 244 deletions

View file

@ -26,7 +26,7 @@ router.get(
router.post(
'/',
asyncHandler(async (req, res) => {
const { title, artist, youtubeUrl } = req.body || {};
const { title, artist, youtubeUrl, description } = req.body || {};
if (!title || !title.trim() || !youtubeUrl || !youtubeUrl.trim()) {
return res.status(400).json({ error: 'title_and_youtube_url_required' });
}
@ -37,6 +37,7 @@ router.post(
title: title.trim(),
artist: artist ? artist.trim() : null,
youtubeUrl: youtubeUrl.trim(),
description: description ? description.trim() : null,
suggestedBy: req.user.id,
});
res.status(201).json(suggestion);