Closed thomaspeugeot closed 5 months ago
currently, when a GET is performed, AstructDBs are copied into AstructAPI.
// slice that will be transmitted to the front
astructAPIs := make([]orm.AstructAPI, 0)
// for each astruct, update fields from the database nullable fields
for idx := range astructDBs {
astructDB := &astructDBs[idx]
_ = astructDB
var astructAPI orm.AstructAPI
// insertion point for updating fields
astructAPI.ID = astructDB.ID
astructDB.CopyBasicFieldsToAstruct_WOP(&astructAPI.Astruct_WOP)
astructAPI.AstructPointersEncoding = astructDB.AstructPointersEncoding
astructAPIs = append(astructAPIs, astructAPI)
}
c.JSON(http.StatusOK, astructAPIs)
one needs to perform the same thing when web socketing
Steps: