func GetStudentInfoByAdmin(w http.ResponseWriter, r *http.Request, userId string, userType models.UserType) interface{} { reservationId := r.PostFormValue("reservation_id") var result = map[string]interface{}{"state": "SUCCESS"} var al = buslogic.AdminLogic{} var studentJson = make(map[string]interface{}) studentInfo, err := al.GetStudentInfoByAdmin(reservationId, userId, userType) if err != nil { ErrorHandler(w, r, err) return nil } studentJson["name"] = studentInfo.Name studentJson["gender"] = studentInfo.Gender studentJson["student_id"] = studentInfo.StudentId studentJson["school"] = studentInfo.School studentJson["hometown"] = studentInfo.Hometown studentJson["mobile"] = studentInfo.Mobile studentJson["email"] = studentInfo.Email studentJson["experience"] = studentInfo.Experience studentJson["problem"] = studentInfo.Problem result["student_info"] = studentJson return result }