saving project notes
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user