mirror of
https://github.com/sasjs/server.git
synced 2026-01-08 23:10:05 +00:00
fix: adde validation + code improvement
This commit is contained in:
@@ -28,7 +28,7 @@ import { FileTree, isFileTree, TreeNode } from '../types'
|
||||
import { getTmpFilesFolderPath } from '../utils'
|
||||
|
||||
interface DeployPayload {
|
||||
appLoc?: string
|
||||
appLoc: string
|
||||
fileTree: FileTree
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ const deploy = async (data: DeployPayload) => {
|
||||
|
||||
await createFileTree(
|
||||
data.fileTree.members,
|
||||
data.appLoc ? data.appLoc.replace(/^\//, '').split('/') : []
|
||||
data.appLoc.replace(/^\//, '').split('/')
|
||||
).catch((err) => {
|
||||
throw { code: 500, ...execDeployErrorResponse, ...err }
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user