basic session management completed #11
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Session Management is very early but working as expected so far.
pls add curly braces everywhere
useless case, already handled above. also would suggest removing the else and using a return
@ -5,2 +5,4 @@
};
function generateRewardSeed(): number {
const min = -Number.MAX_SAFE_INTEGER;
not being used?
move interface to another file like /types/session.ts
this is basically an 'any' type, could move it to another file an call it "LooseObject"
redundant else
invert if
@ -0,0 +93,4 @@
if (!sessions.some(session => session.sessionId === sessionId)) {
return sessionId;
}
}
could remove this for loop and just use some type of UUID
@ -5,2 +5,4 @@
};
function generateRewardSeed(): number {
const min = -Number.MAX_SAFE_INTEGER;
Just for the moment. it is going to be used for seed generation I removed it while testing because i thought it was breaking my join requests
@ -0,0 +93,4 @@
if (!sessions.some(session => session.sessionId === sessionId)) {
return sessionId;
}
}
uuid package is really good, I can help to set it up.
Fixed this code
not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest
i mean only the keyword is redundant. since you are returning in all cases inside the first if block.