Registration

This commit is contained in:
daru
2022-04-14 21:12:45 +02:00
parent cf70db1f96
commit 0cc4c3245f
5 changed files with 71 additions and 5 deletions

View File

@@ -5,6 +5,7 @@ import (
"encoding/json"
"fmt"
"strconv"
"strings"
"time"
"github.com/gookit/color"
@@ -43,6 +44,9 @@ func GetUserBytesCached(username string) ([]byte, error) {
if err != nil {
return data, err
}
if strings.Contains(string(data), "BadResponseException") {
return data, fmt.Errorf("user not found: %s", username)
}
cache.Set(key, data)
return data, err
}