From 847789d50a1bda9c919f48a15866e05a47ed39a8 Mon Sep 17 00:00:00 2001 From: jrtechs Date: Sun, 17 Feb 2019 00:46:57 -0500 Subject: [PATCH] Checked to see if the user was valid and if not redirected them back to the graph generation home page. --- public/js/profileGen.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/public/js/profileGen.js b/public/js/profileGen.js index dda9818..cc09803 100644 --- a/public/js/profileGen.js +++ b/public/js/profileGen.js @@ -1,5 +1,12 @@ -function profileGen(username, container) { - queryAPIByUser("", username, (user) => { +function profileGen(username, container) +{ + queryAPIByUser("", username, (user) => + { + if(!user.hasOwnProperty("id")) + { + alert("User Does Not Exist"); + window.location.href = "./GraphGenerator.html"; + } parseOrgs(user.login).then( (orgsReturn) => { let html = "
\