diff --git a/api/src/controllers/internal/Execution.ts b/api/src/controllers/internal/Execution.ts index bf81519..c243e8c 100644 --- a/api/src/controllers/internal/Execution.ts +++ b/api/src/controllers/internal/Execution.ts @@ -6,7 +6,7 @@ import { PreProgramVars, TreeNode } from '../../types' import { generateFileUploadSasCode, getTmpFilesFolderPath } from '../../utils' export interface ExecutionVars { - [key: string]: string | number | undefined | boolean + [key: string]: string | number | undefined } export class ExecutionController { @@ -56,7 +56,7 @@ export class ExecutionController { const varStatments = Object.keys(vars).reduce( (computed: string, key: string) => - key !== '_returnLog' ? `${computed}%let ${key}=${vars[key]};\n` : '', + `${computed}%let ${key}=${vars[key]};\n`, '' ) @@ -135,11 +135,7 @@ ${program}` return { webout, log: - (debugValue && debugValue >= 131) || - session.crashed || - Object.keys(vars).includes('_returnLog') - ? log - : undefined + (debugValue && debugValue >= 131) || session.crashed ? log : undefined } } diff --git a/api/src/types/Request.ts b/api/src/types/Request.ts index f55f239..bebb033 100644 --- a/api/src/types/Request.ts +++ b/api/src/types/Request.ts @@ -4,7 +4,6 @@ export interface ExecutionQuery { _program: string macroVars?: MacroVars _debug?: number - _returnLog?: boolean } export interface FileQuery { diff --git a/api/src/utils/validation.ts b/api/src/utils/validation.ts index cffd34b..3efd5a9 100644 --- a/api/src/utils/validation.ts +++ b/api/src/utils/validation.ts @@ -86,5 +86,5 @@ export const executeProgramRawValidation = (data: any): Joi.ValidationResult => Joi.object({ _program: Joi.string().required() }) - .pattern(/^/, Joi.alternatives(Joi.string(), Joi.number(), Joi.boolean())) + .pattern(/^/, Joi.alternatives(Joi.string(), Joi.number())) .validate(data)