hey, there. I wonder if we counld add a post hook function inside http handlers.
We can modify fields here.
Here's an example.
func GetAllSystemRole_(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
// ..... some code
result := &PagedResults{Page: page, PageSize: pagesize, Data: records, TotalRecords: totalRows}
if err := systemrole_.AfterDBOperation(); err != nil {. // add hook here
returnError(ctx, w, r, dao.ErrServerInternal)
}
writeJSON(ctx, w, result)
}