Small fixes
This commit is contained in:
parent
516784c6bb
commit
8a2152395f
1 changed files with 2 additions and 5 deletions
|
@ -13,7 +13,7 @@ import Button from "./Button";
|
||||||
function CreateProject(props: { name: string; description: string }): boolean {
|
function CreateProject(props: { name: string; description: string }): boolean {
|
||||||
const project: NewProject = {
|
const project: NewProject = {
|
||||||
name: props.name,
|
name: props.name,
|
||||||
description: props.name,
|
description: props.description,
|
||||||
};
|
};
|
||||||
|
|
||||||
let created = false;
|
let created = false;
|
||||||
|
@ -21,13 +21,10 @@ function CreateProject(props: { name: string; description: string }): boolean {
|
||||||
api
|
api
|
||||||
.createProject(project, localStorage.getItem("accessToken") ?? "")
|
.createProject(project, localStorage.getItem("accessToken") ?? "")
|
||||||
.then((response: APIResponse<Project>) => {
|
.then((response: APIResponse<Project>) => {
|
||||||
//vv_FOR DEBGUGGING_vv
|
|
||||||
console.log(localStorage.getItem("accessToken"));
|
|
||||||
|
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
created = true;
|
created = true;
|
||||||
} else {
|
} else {
|
||||||
console.error("Could not add project");
|
console.error(response.message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|
Loading…
Reference in a new issue