mirror of
https://github.com/ultrasn0w/huso.git
synced 2026-10-26 14:34:17 +01:00
Don't take empty user as accpeted
This commit is contained in:
1 parent
6f7d8b7f4b
commit
e8631de34f
1 file changed
+3
@@ -116,6 +116,9 @@ func GetUserData(username string) (*User, []byte, error) {
|
||||
return nil, nil, err
|
||||
}
|
||||
}
|
||||
if userJikan.Data.MalID == 0 {
|
||||
return nil, nil, fmt.Errorf("user returned empty object: %s", username)
|
||||
}
|
||||
// convert to user
|
||||
user = UserConvert(&userJikan)
|
||||
data, err = json.Marshal(&user)
|
||||
|
||||
Reference in new issue
Block a user