Skip to content

Commit

Permalink
refactor: refactor get_code_update_info function from update_code
Browse files Browse the repository at this point in the history
… widget
  • Loading branch information
Paco committed Jan 7, 2025
1 parent 8dbeb19 commit 48fbb9f
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions core/area_maintenance/widgets/update_code/js/update_code.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,48 @@ update_code.prototype.get_value = async () => {
}//end get_value




/**
* GET_CODE_UPDATE_INFO
* Call code remote server API and gets update info before update the ontology
* @return object api_response
* {
* result : {
* files: []
* info: {version: "6.4.0", ...}
* },
* msg: string
* errors: []
* }
*/
update_code.prototype.get_code_update_info = async (server) => {

// short vars
const code = server.code
const url = server.url
const dedalo_version = page_globals.dedalo_version

const api_response = await data_manager.request({
url : url,
body : {
dd_api : 'dd_utils_api',
action : 'get_code_update_info',
source : {},
options : {
version : dedalo_version,
code : code
}
}
})
if(SHOW_DEBUG===true) {
console.log('))) get_code_update_info update_code api_response:', api_response);;
}


return api_response
}//end get_code_update_info



// @license-end

0 comments on commit 48fbb9f

Please sign in to comment.