Skip to content

Commit

Permalink
issue/hitide-ui-45: testing hitide profile download history
Browse files Browse the repository at this point in the history
  • Loading branch information
jbyrne committed Mar 28, 2024
1 parent 418c190 commit 98c100e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hitideConfig.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var hitideProfileOrigin = "https://hitide.profile.podaac.uat.earthdatacloud.nasa.gov/hitide/api";
// var hitideProfileOrigin = "https://hitide.profile.podaac.sit.earthdatacloud.nasa.gov/hitide/api";
var hitideProfileOrigin = "http://localhost:8080/hitide/api";

window.hitideConfig = {
paletteService: "https://hitide.podaac.earthdatacloud.nasa.gov/palettes",
Expand Down
5 changes: 5 additions & 0 deletions src/jpl/utils/LoginApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ define([
}

function initialLoginCheck(){
console.log('initial login check')
topic.publish(MyDataEvent.prototype.LOGIN_STATUS_CHANGE, appUser);

var state = extractParamFromUrl("state");
Expand All @@ -42,7 +43,9 @@ define([
var code = extractParamFromUrl("code");
if(code){
removeQueryFromUrl();
console.log('auth code: ', code)
loginWithAuthCode(code, urlWithoutQueryOrFragment(), function(user){
console.log(user)
if(user.error){
/* Handle Error (just log it for now) */
console.log("LoginApi.initialLoginCheck() loginWithAuthCode() error: " + user.error);
Expand Down Expand Up @@ -112,6 +115,7 @@ define([
throw Error("LoginApi.safeLogin() called while already logged in");
}
getSessionUser(function(user){
console.log("USER: ",user)
if(user.error){
/* handle error (for now just log error) */
console.log("LoginApi.safeLogin() getSessionUser() error: " + user.error);
Expand Down Expand Up @@ -189,6 +193,7 @@ define([
}

function getSessionUser(callback){
console.log("USER: ",callback)
var xhr = new XMLHttpRequest();
xhr.open("GET", getUserUrl);
xhr.responseType = "json";
Expand Down

0 comments on commit 98c100e

Please sign in to comment.