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