chat sessions in project view
This commit is contained in:
@@ -186,21 +186,21 @@ export async function fetchProjects() {
|
||||
return res.json();
|
||||
}
|
||||
|
||||
export async function createProject({ name, description, colour, icon, projectOnly }) {
|
||||
export async function createProject({ name, description, colour, icon, isolated }) {
|
||||
const res = await fetch(`${BASE_URL}/projects`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ name, description, colour, icon, projectOnly: projectOnly ? 1 : 0 }),
|
||||
body: JSON.stringify({ name, description, colour, icon, isolated: isolated ? 1 : 0 }),
|
||||
});
|
||||
if (!res.ok) throw new Error(`Failed to create project: ${res.status}`);
|
||||
return res.json();
|
||||
}
|
||||
|
||||
export async function updateProject(id, { name, description, colour, icon, projectOnly }) {
|
||||
export async function updateProject(id, { name, description, colour, icon, isolated }) {
|
||||
const res = await fetch(`${BASE_URL}/projects/${id}`, {
|
||||
method: 'PATCH',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ name, description, colour, icon, projectOnly: projectOnly ? 1 : 0}),
|
||||
body: JSON.stringify({ name, description, colour, icon, isolated: isolated ? 1 : 0}),
|
||||
});
|
||||
if (!res.ok) throw new Error(`Failed to update project: ${res.status}`);
|
||||
return res.json();
|
||||
|
||||
Reference in New Issue
Block a user