1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 11:24:35 +00:00

Merge branch 'master' into homepage-sasjs-executor

Conflicts:
	package.json
This commit is contained in:
2021-10-26 09:37:38 +00:00
2 changed files with 5 additions and 3 deletions

View File

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

View File

@@ -74,7 +74,9 @@ describe('deploy', () => {
})
it('should respond with payload example if valid payload was not provided', async () => {
const res = await request(app).post('/deploy').send(getTreeExample())
const res = await request(app)
.post('/deploy')
.send({ fileTree: getTreeExample() })
expect(res.statusCode).toEqual(200)
expect(res.text).toEqual(