From 0cd0c8d8326a131aec98c95e84a3b47b794bdf7f Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Fri, 29 Mar 2024 15:36:42 +0100 Subject: [PATCH] Handler re-order to satisfy human OCD --- backend/main.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/backend/main.go b/backend/main.go index cae088f..4c2056e 100644 --- a/backend/main.go +++ b/backend/main.go @@ -100,34 +100,34 @@ func main() { // All user related routes // userGroup := api.Group("/user") // Not currently in use + api.Get("/users/all", users.ListAllUsers) + api.Get("/project/getAllUsers", users.GetAllUsersProject) api.Post("/login", users.Login) api.Post("/register", users.Register) api.Post("/loginrenew", users.LoginRenew) - api.Delete("/userdelete/:username", users.UserDelete) // Perhaps just use POST to avoid headaches - api.Put("/changeUserName", users.ChangeUserName) - api.Get("/users/all", users.ListAllUsers) api.Post("/promoteToAdmin", users.PromoteToAdmin) - api.Get("/project/getAllUsers", users.GetAllUsersProject) + api.Put("/changeUserName", users.ChangeUserName) + api.Delete("/userdelete/:username", users.UserDelete) // Perhaps just use POST to avoid headaches // All project related routes // projectGroup := api.Group("/project") // Not currently in use api.Get("/getUserProjects", projects.GetUserProjects) - api.Delete("/project/:projectID", projects.DeleteProject) - api.Post("/project", projects.CreateProject) api.Get("/project/:projectId", projects.GetProject) api.Get("/checkIfProjectManager/:projectName", projects.IsProjectManagerHandler) - api.Post("/ProjectRoleChange", projects.ProjectRoleChange) api.Get("/getUsersProject/:projectName", projects.ListAllUsersProject) + api.Post("/project", projects.CreateProject) + api.Post("/ProjectRoleChange", projects.ProjectRoleChange) api.Delete("/removeProject/:projectName", projects.RemoveProject) + api.Delete("/project/:projectID", projects.DeleteProject) // All report related routes // reportGroup := api.Group("/report") // Not currently in use api.Get("/getWeeklyReport", reports.GetWeeklyReport) - api.Post("/submitWeeklyReport", reports.SubmitWeeklyReport) api.Get("/getUnsignedReports/:projectName", reports.GetUnsignedReports) + api.Get("/getWeeklyReportsUser/:projectName", reports.GetWeeklyReportsUserHandler) + api.Post("/submitWeeklyReport", reports.SubmitWeeklyReport) api.Put("/signReport/:reportId", reports.SignReport) api.Put("/addUserToProject", projects.AddUserToProjectHandler) - api.Get("/getWeeklyReportsUser/:projectName", reports.GetWeeklyReportsUserHandler) api.Put("/updateWeeklyReport", reports.UpdateWeeklyReport) // Announce the port we are listening on and start the server