Added support of the onUnknownProfileRespondWithUuid on Chrly

This commit is contained in:
ErickSkrauch 2024-06-11 02:42:53 +02:00
parent 5ee1a88546
commit 5c84a47429
No known key found for this signature in database
GPG Key ID: 669339FCBB30EE0E

View File

@ -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)