Small fixes

This commit is contained in:
Peter KW 2024-03-18 01:31:58 +01:00
parent 516784c6bb
commit 8a2152395f

View file

@ -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) => {