Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
Merge fe811c7 into a831cbd
Browse files Browse the repository at this point in the history
  • Loading branch information
cpacia committed Jul 19, 2018
2 parents a831cbd + fe811c7 commit 0500713
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions api/jsonapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -1803,9 +1803,12 @@ func (i *jsonAPIHandler) GETModerators(w http.ResponseWriter, r *http.Request) {
}
SanitizedResponse(w, resp)
} else {
idBytes := make([]byte, 16)
rand.Read(idBytes)
id := base58.Encode(idBytes)
id := r.URL.Query().Get("asyncID")
if id == "" {
idBytes := make([]byte, 16)
rand.Read(idBytes)
id = base58.Encode(idBytes)
}

type resp struct {
Id string `json:"id"`
Expand Down Expand Up @@ -2623,9 +2626,12 @@ func (i *jsonAPIHandler) POSTFetchProfiles(w http.ResponseWriter, r *http.Reques
resp += "\n]"
SanitizedResponse(w, resp)
} else {
idBytes := make([]byte, 16)
rand.Read(idBytes)
id := base58.Encode(idBytes)
id := r.URL.Query().Get("asyncID")
if id == "" {
idBytes := make([]byte, 16)
rand.Read(idBytes)
id = base58.Encode(idBytes)
}

type resp struct {
Id string `json:"id"`
Expand Down Expand Up @@ -3366,9 +3372,12 @@ func (i *jsonAPIHandler) POSTFetchRatings(w http.ResponseWriter, r *http.Request
resp += "\n]"
SanitizedResponse(w, resp)
} else {
idBytes := make([]byte, 16)
rand.Read(idBytes)
id := base58.Encode(idBytes)
id := r.URL.Query().Get("asyncID")
if id == "" {
idBytes := make([]byte, 16)
rand.Read(idBytes)
id = base58.Encode(idBytes)
}

type resp struct {
Id string `json:"id"`
Expand Down

0 comments on commit 0500713

Please sign in to comment.