rename output fields to original name (not rename)
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Adrien Marquès 2020-03-29 17:01:24 +02:00
parent d7acf771ad
commit 8a0a20294c
Signed by: xdrm-brackets
GPG Key ID: D75243CA236D825E
1 changed files with 6 additions and 1 deletions

View File

@ -95,7 +95,12 @@ func (server httpServer) ServeHTTP(res http.ResponseWriter, req *http.Request) {
response := api.EmptyResponse().WithError(apiErr)
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