Fix bug on validateUser / housekeeping

This commit is contained in:
Nathan Barber
2021-05-10 17:59:06 -04:00
parent 8d4c276652
commit 6378505305
4 changed files with 8 additions and 11 deletions

View File

@@ -34,7 +34,7 @@ const withAPI = withProps((props) => ({
deleteUser: (username) => jhapiRequest("/users/" + username, "DELETE"),
findUser: (username) => jhapiRequest("/users/" + username, "GET"),
validateUser: (username) =>
findUser(username)
jhapiRequest("/users/" + username, "GET")
.then((data) => data.status)
.then((data) => (data > 200 ? false : true)),
failRegexEvent: () =>