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

chore(lint): fixed linting issues

This commit is contained in:
Yury
2024-10-29 11:40:44 +03:00
parent 76750e864d
commit 3053c68bdf
3 changed files with 28 additions and 25 deletions

View File

@@ -189,7 +189,8 @@ ${autoExecContent}`
} }
private scheduleSessionDestroy(session: Session) { private scheduleSessionDestroy(session: Session) {
setTimeout(async () => { setTimeout(
async () => {
if (session.inUse) { if (session.inUse) {
// adding 10 more minutes // adding 10 more minutes
const newDeathTimeStamp = const newDeathTimeStamp =
@@ -204,7 +205,8 @@ ${autoExecContent}`
if (expiresAfterMins && !expiresAfterMins.used) { if (expiresAfterMins && !expiresAfterMins.used) {
// calculate session death time using expiresAfterMins // calculate session death time using expiresAfterMins
const newDeathTimeStamp = const newDeathTimeStamp =
parseInt(session.deathTimeStamp) + expiresAfterMins.mins * 60 * 1000 parseInt(session.deathTimeStamp) +
expiresAfterMins.mins * 60 * 1000
session.deathTimeStamp = newDeathTimeStamp.toString() session.deathTimeStamp = newDeathTimeStamp.toString()
// set expiresAfterMins to true to avoid using it again // set expiresAfterMins to true to avoid using it again
@@ -215,7 +217,9 @@ ${autoExecContent}`
await this.deleteSession(session) await this.deleteSession(session)
} }
} }
}, parseInt(session.deathTimeStamp) - new Date().getTime() - 100) },
parseInt(session.deathTimeStamp) - new Date().getTime() - 100
)
} }
} }

View File

@@ -285,7 +285,7 @@ const getUser = async (
username: user.username, username: user.username,
isActive: user.isActive, isActive: user.isActive,
isAdmin: user.isAdmin, isAdmin: user.isAdmin,
autoExec: getAutoExec ? user.autoExec ?? '' : undefined, autoExec: getAutoExec ? (user.autoExec ?? '') : undefined,
groups: user.groups groups: user.groups
} }
} }

View File

@@ -51,9 +51,8 @@ export const generateFileUploadSasCode = async (
let fileCount = 0 let fileCount = 0
const uploadedFiles: UploadedFiles[] = [] const uploadedFiles: UploadedFiles[] = []
const sasSessionFolderList: string[] = await listFilesInFolder( const sasSessionFolderList: string[] =
sasSessionFolder await listFilesInFolder(sasSessionFolder)
)
sasSessionFolderList.forEach((fileName) => { sasSessionFolderList.forEach((fileName) => {
let fileCountString = fileCount < 100 ? '0' + fileCount : fileCount let fileCountString = fileCount < 100 ? '0' + fileCount : fileCount
fileCountString = fileCount < 10 ? '00' + fileCount : fileCount fileCountString = fileCount < 10 ? '00' + fileCount : fileCount