Skip to content

Commit

Permalink
ADD reflect for resourceMetaInfo.
Browse files Browse the repository at this point in the history
  • Loading branch information
karminski committed Oct 24, 2023
1 parent 9f0cd72 commit 4d01d43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/controller/internal_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"net/http"
"reflect"

"github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10"
Expand Down Expand Up @@ -103,12 +104,13 @@ func (controller *Controller) GenerateSQL(c *gin.Context) {
resourceMetaInfo, errInGetMetaInfo := actionAssemblyLine.GetMetaInfo(resource.ExportOptionsInMap())
fmt.Printf("[DUMP] resource.ExportOptionsInMap(): %+v\n", resource.ExportOptionsInMap())
resourceMetaInfoJSON, _ := json.Marshal(resourceMetaInfo)
fmt.Printf("[DUMP] resourceMetaInfoJSON: %+v\n", resourceMetaInfoJSON)
fmt.Printf("[DUMP] resourceMetaInfoJSON: %+v\n", string(resourceMetaInfoJSON))
fmt.Printf("[DUMP] errInGetMetaInfo: %+v\n", errInGetMetaInfo)
if errInGetMetaInfo != nil {
controller.FeedbackBadRequest(c, ERROR_FLAG_CAN_NOT_GET_RESOURCE_META_INFO, "error in fetch resource meta info: "+errInGetMetaInfo.Error())
return
}
fmt.Printf("[DUMP] resourceMetaInfo typeOf: %+v\n", reflect.TypeOf(resourceMetaInfo))

// form request payload
generateSQLPeripheralRequest, errInNewReq := illacloudperipheralapisdk.NewGenerateSQLPeripheralRequest(resource.ExportTypeInString(), resourceMetaInfo, generateSQLRequest.Description, generateSQLRequest.GetActionInString())
Expand Down

0 comments on commit 4d01d43

Please sign in to comment.