mirror of
https://github.com/elyby/accounts-profiles-endpoint.git
synced 2024-12-01 19:21:02 +05:30
Added support of the onUnknownProfileRespondWithUuid
on Chrly
This commit is contained in:
parent
5ee1a88546
commit
5c84a47429
6
main.go
6
main.go
@ -93,9 +93,9 @@ func main() {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
profileUrl := "http://skinsystem.ely.by/profile/" + username
|
profileUrl := fmt.Sprintf("http://skinsystem.ely.by/profile/%s?onUnknownProfileRespondWithUuid=%s", username, uuid)
|
||||||
if request.FormValue("unsigned") == "false" {
|
if request.FormValue("unsigned") == "false" {
|
||||||
profileUrl += "?unsigned=false"
|
profileUrl += "&unsigned=false"
|
||||||
}
|
}
|
||||||
|
|
||||||
profileResp, err := http.Get(profileUrl)
|
profileResp, err := http.Get(profileUrl)
|
||||||
@ -106,7 +106,7 @@ func main() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if profileResp.StatusCode != http.StatusOK && profileResp.StatusCode != http.StatusNoContent {
|
if profileResp.StatusCode != http.StatusOK {
|
||||||
sentry.CaptureException(fmt.Errorf("received unsuccessful response code from Chrly servicer: %d. error is %w", profileResp.StatusCode, err))
|
sentry.CaptureException(fmt.Errorf("received unsuccessful response code from Chrly servicer: %d. error is %w", profileResp.StatusCode, err))
|
||||||
response.WriteHeader(500)
|
response.WriteHeader(500)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user