diff --git a/preload.js b/preload.js index ab6c7eb..d1079a9 100644 --- a/preload.js +++ b/preload.js @@ -10,5 +10,4 @@ contextBridge.exposeInMainWorld('functions', { onTaskCompleted: (callback) => ipcRenderer.on('task-completed', (_event, value) => { callback(value) }) - // we can also expose variables, not just functions this content is priviledged }) diff --git a/workflows/meb/module/module.js b/workflows/meb/module/module.js index d700fb4..c4a0d5e 100644 --- a/workflows/meb/module/module.js +++ b/workflows/meb/module/module.js @@ -1,10 +1,7 @@ const { dialog, BrowserWindow } = require ("electron"); const dotenv = require('dotenv') const session_start = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/session/start' -const retrofit_results = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/persistence/retrofit-results' -//const session_start = 'http://127.0.0.1:15789/v1.4/session/start' -//const retrofit_results = 'http://127.0.0.1:15789/v1.4/persistence/retrofit-results' - +const retrofit_results = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/workflow/insel-monthly-energy-balance' exports.run = async (application, buildings, tmp_path) => { console.log(`Executing ${application}`) @@ -27,7 +24,8 @@ exports.run = async (application, buildings, tmp_path) => { const session_id = response.headers.get('session_id') let token = response.headers.get('token') console.log(`token: ${token}`) - request = { 'scenarios': [] } + request = new FormData() + requestAnimationFrame application_response.scenarios.forEach((scenario) => { scenario_request = {} scenario_request[`${scenario}`] = buildings diff --git a/workflows/meb/run.js b/workflows/meb/run.js index f3c0d29..5e242b7 100644 --- a/workflows/meb/run.js +++ b/workflows/meb/run.js @@ -1,5 +1,5 @@ let param = { - 'workflow': 'retrofit', + 'workflow': 'meb', 'application': '', 'buildings': [] }