From a16583d304eb53386f273bc04623515f248514d5 Mon Sep 17 00:00:00 2001 From: Soumik Dutta Date: Sun, 26 May 2024 02:10:24 +0530 Subject: [PATCH] remove float32 datatype and rearrange fields --- constants/datatypes.go | 1 - controller/profile.go | 2 +- interfaces/profile.go | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/constants/datatypes.go b/constants/datatypes.go index 518d3e5..9c6b7e1 100644 --- a/constants/datatypes.go +++ b/constants/datatypes.go @@ -4,7 +4,6 @@ const ( TYPE_BOOL = "bool" TYPE_STRING = "string" TYPE_INTEGER = "int" - TYPE_FLOAT32 = "float32" TYPE_FLOAT64 = "float64" // complex diff --git a/controller/profile.go b/controller/profile.go index 5710f82..4c27913 100644 --- a/controller/profile.go +++ b/controller/profile.go @@ -94,7 +94,7 @@ func AssignNilPossibleValue[V int | float64 | string | constantModel.Course | co if !field.IsNull { field.Value = **value } - field.DataType = fmt.Sprintf("%v", reflect.TypeOf(*value)) + field.DataType = fmt.Sprintf("%v", reflect.TypeOf(*value))[1:] return } diff --git a/interfaces/profile.go b/interfaces/profile.go index c949f31..42e9818 100644 --- a/interfaces/profile.go +++ b/interfaces/profile.go @@ -119,9 +119,9 @@ type ProfileSummerTermSPI struct { } type ProfileCurrentAcademics struct { - Misc ProfileCurrentAcademicsMisc `json:"misc,omitempty"` SemesterSPI ProfileSemesterSPI `json:"semester_spi,omitempty"` SummerTermSPI ProfileSummerTermSPI `json:"summer_term_spi,omitempty"` + Misc ProfileCurrentAcademicsMisc `json:"misc,omitempty"` } type StudentProfile struct {