Make project table associated with the user

This commit is contained in:
Takeshi Kimata
2024-05-22 22:33:21 +09:00
parent 704f20239e
commit 7a0bb63e7b
17 changed files with 174 additions and 24 deletions

View File

@@ -29,10 +29,12 @@ async function fetchProjects() {
/**
* Create project
*/
async function createProject(name: string, detail: string) {
async function createProject(name: string, detail: string, isPublic: boolean, userId: number) {
const newProjectData = {
name: name,
detail: detail,
name,
detail,
isPublic,
userId,
};
const fetchOptions = {
@@ -61,10 +63,11 @@ async function createProject(name: string, detail: string) {
/**
* Update project
*/
async function updateProject(projectId: number, name: string, detail: string) {
async function updateProject(projectId: number, name: string, detail: string, isPublic: boolean) {
const updatedProjectData = {
name: name,
detail: detail,
name,
detail,
isPublic,
};
const fetchOptions = {