feat: add done/checkbox support to PATCH handler

This commit is contained in:
2026-02-26 03:55:13 +00:00
parent b00c8d3eb0
commit 8a168759a1

View File

@@ -48,6 +48,7 @@ app.patch('/api/notes/:id', (req, res) => {
if (req.body.text !== undefined) note.text = req.body.text; if (req.body.text !== undefined) note.text = req.body.text;
if (req.body.column !== undefined) note.column = req.body.column; if (req.body.column !== undefined) note.column = req.body.column;
if (req.body.order !== undefined) note.order = req.body.order; if (req.body.order !== undefined) note.order = req.body.order;
if (req.body.done !== undefined) note.done = req.body.done;
if (req.body.reorder) { if (req.body.reorder) {
req.body.reorder.forEach(r => { req.body.reorder.forEach(r => {
const n = data.notes.find(x => x.id === r.id); const n = data.notes.find(x => x.id === r.id);