Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into staging
  • Loading branch information
aaronm-2112 committed Feb 2, 2024
2 parents 5af6bf3 + b290032 commit e030e4b
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import api from "../api/api"
import api from "../api/api";
import { showHideDropdownButtons, confirm_click_account_function } from "../../globals";

/**
Expand Down Expand Up @@ -82,7 +82,6 @@ window.defaultProfileMatchesCurrentWorkspace = async () => {
let userInfo = await api.getUserInformation();
let currentWorkspace = userInfo["preferredOrganization"];


// check if the defaultbfAccount is using an pre 13.1.0 API Key formatting by seeing if it has 'n:organization' in it
if (!window.defaultBfAccount.includes("n:organization")) {
// grab the suffix out of the defaultBfAccount where the suffix is all of the text after the final '-'
Expand All @@ -91,7 +90,7 @@ window.defaultProfileMatchesCurrentWorkspace = async () => {
// get the name of the preferredOrganization to compare it to the suffix
let organizations = await api.getOrganizations();

organizations = organizations["organizations"]
organizations = organizations["organizations"];

for (const organization of organizations) {
if (organization["organization"]["id"] === currentWorkspace) {
Expand Down Expand Up @@ -132,7 +131,7 @@ window.switchToCurrentWorkspace = async () => {
let currentWorkspace = userInfo["preferredOrganization"];
let emailSuffix = userInfo["email"].split("@")[0];

let userMachineID = await window.electron.ipcRenderer.invoke("get-nodestorage-key", username)
let userMachineID = await window.electron.ipcRenderer.invoke("get-nodestorage-key", username);

// let emailSuffix = defaultBfAccount.
let targetProfile = `soda-pennsieve-${userMachineID}-${emailSuffix}-${currentWorkspace.toLowerCase()}`;
Expand Down

0 comments on commit e030e4b

Please sign in to comment.