1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-06 14:10:06 +00:00

fix: reqHeadrs.txt will contain headers to access APIs

This commit is contained in:
Saad Jutt
2022-05-08 02:49:16 +05:00
parent 25dc5dd215
commit 636301e664
7 changed files with 31 additions and 32 deletions

View File

@@ -17,8 +17,8 @@ import {
ExecutionController,
ExecutionVars
} from './internal'
import { PreProgramVars } from '../types'
import {
getPreProgramVariables,
getTmpFilesFolderPath,
HTTPHeaders,
isDebugOn,
@@ -210,16 +210,3 @@ const executeReturnJson = async (
}
}
}
const getPreProgramVariables = (req: any): PreProgramVars => {
const host = req.get('host')
const protocol = req.protocol + '://'
const { user, accessToken } = req
return {
username: user.username,
userId: user.userId,
displayName: user.displayName,
serverUrl: protocol + host,
accessToken
}
}