Merge pull request #1797 from Luis-Fernando-Molina/develop
Contribution: Bug Fix, Platform Client Crash
This commit is contained in:
2 files changed
+24
-2
No files matched your search
@@ -47,6 +47,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
let params = JSON.parse(body)
|
||||
|
||||
switch (params.method) {
|
||||
@@ -135,6 +136,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
let params = JSON.parse(body)
|
||||
|
||||
switch (params.method) {
|
||||
@@ -245,6 +247,8 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest)
|
||||
|
||||
function processRequest(messageReceived) {
|
||||
if (messageReceived === undefined) { return }
|
||||
|
||||
let timestamp = (new Date()).valueOf()
|
||||
let source = requestPath[3]
|
||||
let exchange = requestPath[4]
|
||||
@@ -295,6 +299,8 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let docsSchema = JSON.parse(body)
|
||||
let project = requestPath[3]
|
||||
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Nodes'
|
||||
@@ -326,6 +332,8 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let docsSchema = JSON.parse(body)
|
||||
let project = requestPath[3]
|
||||
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Concepts'
|
||||
@@ -357,6 +365,8 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let docsSchema = JSON.parse(body)
|
||||
let project = requestPath[3]
|
||||
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Topics'
|
||||
@@ -388,6 +398,8 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let docsSchema = JSON.parse(body)
|
||||
let project = requestPath[3]
|
||||
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Tutorials'
|
||||
@@ -419,6 +431,8 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let docsSchema = JSON.parse(body)
|
||||
let project = requestPath[3]
|
||||
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Reviews'
|
||||
@@ -450,6 +464,8 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let docsSchema = JSON.parse(body)
|
||||
let project = requestPath[3]
|
||||
let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/Docs-Books'
|
||||
@@ -995,6 +1011,8 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let params = JSON.parse(body)
|
||||
|
||||
switch (params.method) {
|
||||
@@ -1416,6 +1434,8 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
async function processRequest(body) {
|
||||
try {
|
||||
if (body === undefined) { return }
|
||||
|
||||
let plugin = JSON.parse(body)
|
||||
let project = requestPath[2]
|
||||
let folder = requestPath[3]
|
||||
@@ -1550,6 +1570,8 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
|
||||
async function processRequest(body) {
|
||||
|
||||
if (body === undefined) { return }
|
||||
|
||||
let fileContent = body
|
||||
let fileName = unescape(requestPath[2])
|
||||
let filePath = global.env.PATH_TO_MY_WORKSPACES + '/' + fileName + '.json'
|
||||
|
||||
@@ -26,12 +26,12 @@ exports.newFoundationsUtilitiesHttpRequests = function () {
|
||||
httpRequest.on('error', function (err) {
|
||||
console.log('[ERROR] getBody -> err.stack = ' + err.stack)
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(global.DEFAULT_FAIL_RESPONSE), httpResponse)
|
||||
throw('Not possible to get HTTP Body.')
|
||||
callback()
|
||||
})
|
||||
} catch (err) {
|
||||
console.log('[ERROR] getBody -> err.stack = ' + err.stack)
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(global.DEFAULT_FAIL_RESPONSE), httpResponse)
|
||||
throw('Not possible to get HTTP Body.')
|
||||
callback()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user