From 2bc558b4e03f3d4872ed4a920f055efe58b74eee Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Wed, 9 Feb 2022 13:46:42 -0800 Subject: [PATCH] debug/api-router-remove-and-delete-contact --- controllers/authController.go | 2 +- routes/routes.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/controllers/authController.go b/controllers/authController.go index 2e608ab..aee3cea 100644 --- a/controllers/authController.go +++ b/controllers/authController.go @@ -846,7 +846,7 @@ func CreateContact(c *fiber.Ctx) error { }) } -func RemoveContact(c *fiber.Ctx) error { +func DeleteContact(c *fiber.Ctx) error { var data map[string]string ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) diff --git a/routes/routes.go b/routes/routes.go index 944c2f6..017e531 100644 --- a/routes/routes.go +++ b/routes/routes.go @@ -20,7 +20,8 @@ func Setup(app *fiber.App) { app.Post("/api/student/updateHomeroom", controllers.UpdateStudentHomeroom) app.Post("/api/student/updateLocker", controllers.UpdateStudentLocker) app.Post("/api/studnet/updateYOG", controllers.UpdateStudentYOG) - app.Post("/api/studnet/updateContacts", controllers.UpdateStudentContacts) + app.Post("/api/studnet/addContact", controllers.AddStudentContact) + app.Post("/api/student/removeContact", controllers.RemoveStudentContact) app.Post("/api/student/updatePassword", controllers.UpdateStudentPassword) app.Post("/api/student/resetPassword", controllers.ResetStudentPassword) app.Post("/api/student/updateAddress", controllers.UpdateStudentAddress) @@ -35,7 +36,7 @@ func Setup(app *fiber.App) { app.Post("/api/student/contact/updateWorkPhone", controllers.UpdateContactWorkPhone) app.Post("/api/student/contact/updateEmail", controllers.UpdateContactEmail) app.Post("/api/student/contact/updatePriority", controllers.UpdateContactPriority) - app.Post("/api/student/contact/removeContact", controllers.RemoveContact) + app.Post("/api/student/contact/deleteContact", controllers.DeleteContact) // Teacher Login Handling app.Get("/api/teacher", controllers.Teacher)