basic session management completed #11
@ -56,22 +56,22 @@ function getSession(sessionIdOrRequest: string | FindSessionRequest): any[] {
|
||||
|
||||
];
|
||||
}
|
||||
return [];
|
||||
} else {
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
const request = sessionIdOrRequest as FindSessionRequest;
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
const matchingSessions = sessions.filter(session => {
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
for (const key in request) {
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
if (key !== "eloRating" && key !== "queryId" && request[key] !== session[key as keyof Session]) {
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
return false;
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
}
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
}
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
console.log("Found Matching Sessions:", matchingSessions);
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
return true;
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
});
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
return matchingSessions.map(session => ({
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
createdBy: session.creatorId,
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
id: session.sessionId
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
}));
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
}
|
||||
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
const request = sessionIdOrRequest as FindSessionRequest;
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
const matchingSessions = sessions.filter(session => {
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
for (const key in request) {
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
if (key !== "eloRating" && key !== "queryId" && request[key] !== session[key as keyof Session]) {
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
return false;
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
}
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
}
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
console.log("Found Matching Sessions:", matchingSessions);
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
return true;
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
});
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
return matchingSessions.map(session => ({
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
createdBy: session.creatorId,
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
id: session.sessionId
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
}));
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
}
|
||||
|
||||
function getSessionByCreatorID(creatorId: string): Session | undefined {
|
||||
@ -101,14 +101,14 @@ function getNewSessionID(): string {
|
||||
![]() move interface to another file like /types/session.ts move interface to another file like /types/session.ts
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() this is basically an 'any' type, could move it to another file an call it "LooseObject" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() redundant else redundant else
![]() invert if invert if
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
![]() i mean only the keyword is redundant. since you are returning in all cases inside the first if block. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
function updateSession(sessionId: string, sessionData: string): boolean {
|
||||
const session = sessions.find(session => session.sessionId === sessionId);
|
||||
if (!session) return false;
|
||||
try {
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
const updatedData = JSON.parse(sessionData);
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
Object.assign(session, updatedData);
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
return true;
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
} catch (error) {
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
console.error("Invalid JSON string for session update.");
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
return false;
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
}
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
try {
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
const updatedData = JSON.parse(sessionData);
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
Object.assign(session, updatedData);
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
return true;
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
} catch (error) {
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
console.error("Invalid JSON string for session update.");
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
return false;
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
}
|
||||
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
||||
}
|
||||
|
||||
function deleteSession(sessionId: string): boolean {
|
||||
|
||||
![]() move interface to another file like /types/session.ts move interface to another file like /types/session.ts
![]() move interface to another file like /types/session.ts 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" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() this is basically an 'any' type, could move it to another file an call it "LooseObject" this is basically an 'any' type, could move it to another file an call it "LooseObject"
![]() redundant else redundant else
![]() redundant else redundant else
![]() invert if invert if
![]() invert if invert if
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest
![]() not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest 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. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
![]() i mean only the keyword is redundant. since you are returning in all cases inside the first if block. i mean only the keyword is redundant. since you are returning in all cases inside the first if block.
|
@ -24,4 +24,4 @@ export interface Session {
|
||||
freePublic: number;
|
||||
freePrivate: number;
|
||||
fullReset: number;
|
||||
}
|
||||
}
|
||||
|
move interface to another file like /types/session.ts
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"
this is basically an 'any' type, could move it to another file an call it "LooseObject"
redundant else
redundant else
invert if
invert if
not redundant, its a flip in the case depending on if the input is a string or a findSessionRequest
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.
i mean only the keyword is redundant. since you are returning in all cases inside the first if block.