1
0
mirror of https://github.com/sasjs/server.git synced 2026-04-09 15:13:13 +00:00

feat(drive): GET folder contents API added

This commit is contained in:
Saad Jutt
2022-03-29 23:27:44 +05:00
parent 0a5aeceab5
commit 0ac9e4af7d
9 changed files with 313 additions and 34 deletions

View File

@@ -13,6 +13,7 @@ export * from './parseLogToArray'
export * from './removeTokensInDB'
export * from './saveTokensInDB'
export * from './setProcessVariables'
export * from './setupFolders'
export * from './sleep'
export * from './upload'
export * from './validation'

View File

@@ -0,0 +1,7 @@
import { createFolder } from '@sasjs/utils'
import { getTmpFilesFolderPath } from './file'
export const setupFolders = async () => {
const drivePath = getTmpFilesFolderPath()
await createFolder(drivePath)
}

View File

@@ -98,6 +98,11 @@ export const fileParamValidation = (data: any): Joi.ValidationResult =>
_filePath: filePathSchema
}).validate(data)
export const folderParamValidation = (data: any): Joi.ValidationResult =>
Joi.object({
_folderPath: Joi.string()
}).validate(data)
export const runSASValidation = (data: any): Joi.ValidationResult =>
Joi.object({
code: Joi.string().required()