Browse Source

Checked to see if the user was valid and if not redirected them back to the graph generation home page.

pull/11/head
Jeffery Russell 5 years ago
parent
commit
847789d50a
1 changed files with 9 additions and 2 deletions
  1. +9
    -2
      public/js/profileGen.js

+ 9
- 2
public/js/profileGen.js View File

@ -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) => { parseOrgs(user.login).then( (orgsReturn) => {
let html = let html =
"<div class=\"card\" style=\"w-100\"> \ "<div class=\"card\" style=\"w-100\"> \

Loading…
Cancel
Save