mirror of
https://github.com/sasjs/server.git
synced 2026-01-03 21:10:05 +00:00
feat: set response headers provded by SAS Code execution
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import express from 'express'
|
||||
import { Request, Security, Route, Tags, Post, Body } from 'tsoa'
|
||||
import { ExecutionController } from './internal'
|
||||
import { ExecuteReturnRaw, ExecutionController } from './internal'
|
||||
import { PreProgramVars } from '../types'
|
||||
|
||||
interface ExecuteSASCodePayload {
|
||||
@@ -30,13 +30,13 @@ export class CodeController {
|
||||
|
||||
const executeSASCode = async (req: any, { code }: ExecuteSASCodePayload) => {
|
||||
try {
|
||||
const result = await new ExecutionController().executeProgram(
|
||||
const { result } = (await new ExecutionController().executeProgram(
|
||||
code,
|
||||
getPreProgramVariables(req),
|
||||
{ ...req.query, _debug: 131 },
|
||||
undefined,
|
||||
true
|
||||
)
|
||||
)) as ExecuteReturnRaw
|
||||
|
||||
return result as string
|
||||
} catch (err: any) {
|
||||
|
||||
Reference in New Issue
Block a user