canvas-backend/src/api/project/project.controller.ts
2025-01-29 17:54:10 +06:00

37 lines
1,003 B
TypeScript

export const getEachProjects = async (id: string) => {
try {
console.log(id);
return { id: id }
} catch (error: any) {
console.log(error.msg)
return { status: 500, message: "An error occurred while fetching projects" }
}
}
export const getAllProjects = async (userId: string) => {
try {
// this will return all the project associated with the user
} catch (error: any) {
console.log(error.msg);
return { status: 500, message: "An error occurred while fetching projects" }
}
}
export const updateProject = async (id: string, data: any) => {
try {
} catch (error: any) {
console.log(error.msg);
return { status: 500, message: "An error occurred while updating projects" }
}
}
export const deleteProject = async (id: string) => {
try {
} catch (error: any) {
console.log(error.msg);
return { status: 500, message: "An error occurred while deleting projects" }
}
}