rename output fields to original name (not rename)
This commit is contained in:
parent
d7acf771ad
commit
8a0a20294c
7
http.go
7
http.go
|
@ -95,7 +95,12 @@ func (server httpServer) ServeHTTP(res http.ResponseWriter, req *http.Request) {
|
||||||
response := api.EmptyResponse().WithError(apiErr)
|
response := api.EmptyResponse().WithError(apiErr)
|
||||||
for key, value := range returned {
|
for key, value := range returned {
|
||||||
|
|
||||||
response.SetData(name, value)
|
// find original name from rename
|
||||||
|
for name, param := range service.Output {
|
||||||
|
if param.Rename == key {
|
||||||
|
response.SetData(name, value)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 11. apply headers
|
// 11. apply headers
|
||||||
|
|
Loading…
Reference in New Issue