Finals details of saving plugins polished

This commit is contained in:
Luis Fernando Molina committed 2021-06-30 13:36:20 +02:00
1 parent 37c3a9e180
commit 01550df79d
3 files changed
+3 -2

No files matched your search

+1
View File
@@ -1196,6 +1196,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
let fileContent = JSON.stringify(plugin, undefined, 4)
const fs = require('fs')
fs.writeFileSync(filePath + '/' + fileName + '.json', fileContent)
respondWithContent(JSON.stringify(global.DEFAULT_OK_RESPONSE), httpResponse)
} catch (err) {
console.log('[ERROR] httpInterface -> SavePlugin -> Method call produced an error.')
console.log('[ERROR] httpInterface -> SavePlugin -> err.stack = ' + err.stack)
@@ -274,7 +274,7 @@ function newWorkspace() {
/* Lets check the result of the call through the http interface */
data = JSON.parse(data)
if (err.result === GLOBAL.DEFAULT_OK_RESPONSE.result && data.result === GLOBAL.DEFAULT_OK_RESPONSE.result) {
pluginFile.payload.uiObject.setInfoMessage('Plugin Saved.')
pluginFile.payload.uiObject.setInfoMessage('Plugin Saved.', 250)
return
}
console.log('[ERROR] Saving Plugin File: ' + JSON.stringify(data))
@@ -18,7 +18,7 @@
"referralProgram": {
"type": "Referral Program",
"name": "New Referral Program",
"config": "{\n \"percentage\": 60\n}",
"config": "{\n \"percentage\": 80\n}",
"project": "Governance",
"userReferrers": [
{