API Endpoints for Verifications and Pending.

This commit is contained in:
2020-12-30 12:54:09 -05:00
parent 62246e9c23
commit 7a41ebb48d

View File

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