saving project notes

This commit is contained in:
Storme-bit
2026-04-18 23:17:34 -07:00
parent ee8f5bb5f0
commit 1fc6e8a66d
2 changed files with 8 additions and 4 deletions

View File

@@ -100,11 +100,11 @@ async function getProjects() {
return res.json();
}
async function updateProject(id, { name, description, colour, icon }) {
async function updateProject(id, fields = {}) {
const res = await fetch(`${BASE_URL}/projects/${id}`, {
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ name, description, colour, icon })
body: JSON.stringify(fields)
});
if (!res.ok) throw new Error(`Failed to update project: ${res.status}`);
return res.json();