mirror of
https://github.com/nfonteyne/octane-website.git
synced 2026-09-03 23:24:48 +02:00
update: visual update, phone responsive, db migration
This commit is contained in:
parent
73ebd6ad49
commit
e97aa2c6c3
16 changed files with 894 additions and 244 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue