mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
split out module and route creation in router and router output only does one module
This commit is contained in:
@@ -22,10 +22,10 @@ type HTTPServer struct {
|
||||
}
|
||||
|
||||
type ResponseIOError struct {
|
||||
Index int `json:"index"`
|
||||
OutputErrors []string `json:"outputErrors"`
|
||||
ProcessError *string `json:"processError"`
|
||||
InputError *string `json:"inputError"`
|
||||
Index int `json:"index"`
|
||||
OutputError *string `json:"outputError"`
|
||||
ProcessError *string `json:"processError"`
|
||||
InputError *string `json:"inputError"`
|
||||
}
|
||||
|
||||
type IOResponseData struct {
|
||||
@@ -113,14 +113,9 @@ func (hs *HTTPServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
errorToAdd.ProcessError = &errorMsg
|
||||
}
|
||||
|
||||
if responseIOError.OutputErrors != nil {
|
||||
outputErrorMsgs := []string{}
|
||||
|
||||
for _, outputError := range responseIOError.OutputErrors {
|
||||
outputErrorMsgs = append(outputErrorMsgs, outputError.Error())
|
||||
}
|
||||
|
||||
errorToAdd.OutputErrors = outputErrorMsgs
|
||||
if responseIOError.OutputError != nil {
|
||||
errorMsg := responseIOError.OutputError.Error()
|
||||
errorToAdd.OutputError = &errorMsg
|
||||
}
|
||||
|
||||
response.IOErrors = append(response.IOErrors, errorToAdd)
|
||||
|
||||
@@ -24,7 +24,7 @@ type RouteError struct {
|
||||
|
||||
type RouteIOError struct {
|
||||
Index int
|
||||
OutputErrors []error
|
||||
OutputError error
|
||||
ProcessError error
|
||||
InputError error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user