MCPcopy Create free account
hub / github.com/Bitbox-Connect/Bitbox / deleteProject

Function deleteProject

client/src/context/ProjectState.jsx:57–71  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

55
56 // Delete a Project
57 const deleteProject = async (id) => {
58 // API CALL - Delete Project
59 const response = await fetch(`${VITE_SERVER_PORT}/api/projects/deleteproject/${id}`, {
60 method: "DELETE",
61 headers: {
62 "Content-Type": "application/json",
63 "auth-token": localStorage.getItem('token')
64 },
65 body: JSON.stringify(),
66 });
67 const json = await response.json();
68 console.log(json)
69 const newProjects = userProjects.filter((project) => { return project._id !== id });
70 setUserProjects(newProjects);
71 }
72
73 // Edit a Project
74 const editProject = async (id, title, description, gitHubLink, youTubeLink) => {

Callers 2

handleDeleteFunction · 0.85
TestModalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected