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

feat(deploy): add appLoc

This commit is contained in:
Yury Shkoda
2021-10-04 16:57:54 +03:00
parent 7b403c151e
commit f0f1e1d57e

View File

@@ -21,7 +21,7 @@ router.get('/', async (req, res) => {
})
router.post('/deploy', async (req, res) => {
if (!isFileTree(req.body)) {
if (!isFileTree({ members: req.body.members })) {
res.status(400).send({
status: 'failure',
message: 'Provided not supported data format.',
@@ -31,7 +31,10 @@ router.post('/deploy', async (req, res) => {
return
}
await createFileTree(req.body.members)
await createFileTree(
req.body.members,
req.body.appLoc ? req.body.appLoc.replace(/^\//, '').split('/') : []
)
.then(() => {
res.status(200).send({
status: 'success',