mirror of
https://github.com/elyby/accounts-profiles-endpoint.git
synced 2024-11-29 10:12:07 +05:30
Pass response status from Chrly to the final response
This commit is contained in:
parent
9cad666e9f
commit
e84e39eeae
7
main.go
7
main.go
@ -85,7 +85,14 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
if profileResp.StatusCode != http.StatusOK && profileResp.StatusCode != http.StatusNoContent {
|
||||
// TODO: log response
|
||||
response.WriteHeader(500)
|
||||
return
|
||||
}
|
||||
|
||||
response.Header().Set("Content-Type", "application/json")
|
||||
response.WriteHeader(profileResp.StatusCode)
|
||||
|
||||
_, err = io.Copy(response, profileResp.Body)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user