diff --git a/controllers/update/studentController.go b/controllers/update/studentController.go index 3d92000..69d682f 100644 --- a/controllers/update/studentController.go +++ b/controllers/update/studentController.go @@ -4,7 +4,6 @@ import ( "context" "encoding/base64" "fmt" - "io/ioutil" "os" "strings" "time" @@ -860,7 +859,7 @@ func UpdateStudentPhoto(c *fiber.Ctx) error { } // Read the entire file into a byte slice - bytes, err := ioutil.ReadFile(fmt.Sprintf("./database/images/%s", image)) + bytes, err := os.ReadFile(fmt.Sprintf("./database/images/%s", image)) if err != nil { cancel() return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{ diff --git a/controllers/update/teacherController.go b/controllers/update/teacherController.go index 979c190..ba27c30 100644 --- a/controllers/update/teacherController.go +++ b/controllers/update/teacherController.go @@ -3,7 +3,6 @@ package update import ( "context" "fmt" - "io/ioutil" "os" "strings" "time" @@ -422,7 +421,7 @@ func UpdateTeacherPhoto(c *fiber.Ctx) error { } // Read the entire file into a byte slice - bytes, err := ioutil.ReadFile(fmt.Sprintf("./database/images/%s", image)) + bytes, err := os.ReadFile(fmt.Sprintf("./database/images/%s", image)) if err != nil { cancel() return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{