diff --git a/backend/main.go b/backend/main.go index bba3fa6..1aaca45 100644 --- a/backend/main.go +++ b/backend/main.go @@ -71,7 +71,6 @@ func main() { server.Post("/api/loginrenew", gs.LoginRenew) server.Delete("/api/userdelete", gs.UserDelete) // Perhaps just use POST to avoid headaches - server.Post("/api/project", gs.CreateProject) // Announce the port we are listening on and start the server err = server.Listen(fmt.Sprintf(":%d", conf.Port)) diff --git a/frontend/src/API/API.ts b/frontend/src/API/API.ts index 24854c0..2dbd51e 100644 --- a/frontend/src/API/API.ts +++ b/frontend/src/API/API.ts @@ -1,4 +1,3 @@ -import { NewProject, Project } from "../Types/Project"; import { NewUser, User } from "../Types/Users"; // Defines all the methods that an instance of the API must implement @@ -7,8 +6,6 @@ interface API { registerUser(user: NewUser): Promise; /** Remove a user */ removeUser(username: string): Promise; - /** Create a project */ - createProject(project: NewProject): Promise; } // Export an instance of the API @@ -32,14 +29,4 @@ export const api: API = { body: JSON.stringify(username), }).then((res) => res.json() as Promise); }, - - async createProject(project: NewProject): Promise { - return fetch("/api/project", { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify(project), - }).then((res) => res.json() as Promise); - }, }; diff --git a/frontend/src/Types/Project.ts b/frontend/src/Types/Project.ts deleted file mode 100644 index bb4f8c7..0000000 --- a/frontend/src/Types/Project.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface Project { - id: number; - name: string; - description: string; - owner: string; - created: string; // This is a date -} - -export interface NewProject { - name: string; - description: string; - owner: string; -}