basic session management completed #11
@ -56,7 +56,8 @@ 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.
|
||||
}
|
||||
![]() 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;
|
||||
const matchingSessions = sessions.filter(session => {
|
||||
for (const key in request) {
|
||||
@ -71,7 +72,6 @@ function getSession(sessionIdOrRequest: string | FindSessionRequest): any[] {
|
||||
![]() 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.
|
||||
createdBy: session.creatorId,
|
||||
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.
|
||||
}
|
||||
|
||||
function getSessionByCreatorID(creatorId: string): Session | undefined {
|
||||
|
||||
![]() 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.
|
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.