1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-11 08:20:04 +00:00

feat(executor): improved api response

This commit is contained in:
Yury Shkoda
2021-10-05 17:24:20 +03:00
parent 52275ba67d
commit 707b503942
4 changed files with 74 additions and 82 deletions

View File

@@ -1,5 +1,5 @@
import path from 'path'
import { getRealPath } from '@sasjs/utils'
import { getRealPath, generateTimestamp } from '@sasjs/utils'
export const getTmpFolderPath = () =>
getRealPath(path.join(__dirname, '..', '..', 'tmp'))
@@ -11,3 +11,13 @@ export const getTmpLogFolderPath = () => path.join(getTmpFolderPath(), 'logs')
export const getTmpWeboutFolderPath = () =>
path.join(getTmpFolderPath(), 'webouts')
export const generateUniqueFileName = (fileName: string, extension = '') =>
[
fileName,
'-',
Math.round(Math.random() * 100000),
'-',
generateTimestamp(),
extension
].join('')