1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-12 03:54:34 +00:00

fix(web): ability to use get/patch User API in desktop mode.

This commit is contained in:
Saad Jutt
2022-05-27 17:01:14 +05:00
parent b066734398
commit 2c259fe1de
6 changed files with 79 additions and 14 deletions

View File

@@ -3,12 +3,11 @@ import { Request, Security, Route, Tags, Post, Body } from 'tsoa'
import { ExecuteReturnJson, ExecutionController } from './internal'
import { ExecuteReturnJsonResponse } from '.'
import {
getDesktopUserAutoExecPath,
getPreProgramVariables,
getUserAutoExec,
ModeType,
parseLogToArray
} from '../utils'
import { readFile } from '@sasjs/utils'
interface ExecuteSASCodePayload {
/**
@@ -43,7 +42,7 @@ const executeSASCode = async (
const userAutoExec =
process.env.MODE === ModeType.Server
? user?.autoExec
: await readFile(getDesktopUserAutoExecPath())
: await getUserAutoExec()
try {
const { webout, log, httpHeaders } =