Browse Source

API Endpoints for Verifications and Pending.

hkremer/rebranding
Gregory Rudolph 4 years ago
parent
commit
7a41ebb48d
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 6
      site-api.go

6
site-api.go

@ -162,13 +162,13 @@ func getVerifications(w http.ResponseWriter, r *http.Request) { @@ -162,13 +162,13 @@ func getVerifications(w http.ResponseWriter, r *http.Request) {
var v []Verification
for _, file := range files {
info := strings.Split(file, "-")
if len(info) < 3 {
if len(info) < 2 {
continue
}
var ver Verification
ver.UserID = info[0]
ver.UserID = strings.Replace(info[0], "verifications/", "", -1)
ver.Username = info[1]
ver.Photo = info[2]
ver.Photo = file
v = append(v, ver)
}
verifications, err := json.Marshal(v)

Loading…
Cancel
Save