basic session management completed #11

Merged
AKCore merged 9 commits from main into main 2023-06-03 19:24:57 -07:00
4 changed files with 32 additions and 37 deletions
Showing only changes of commit 120750b42a - Show all commits

View File

@ -4,13 +4,13 @@ import { getSession } from "@/src/managers/sessionManager";
AngeloTadeucci commented 2023-06-03 17:57:00 -07:00 (Migrated from github.com)
Review

pls add curly braces everywhere

pls add curly braces everywhere
AngeloTadeucci commented 2023-06-03 17:57:00 -07:00 (Migrated from github.com)
Review

pls add curly braces everywhere

pls add curly braces everywhere
AngeloTadeucci commented 2023-06-03 17:58:10 -07:00 (Migrated from github.com)
Review

useless case, already handled above. also would suggest removing the else and using a return

useless case, already handled above. also would suggest removing the else and using a return
AngeloTadeucci commented 2023-06-03 17:58:10 -07:00 (Migrated from github.com)
Review

useless case, already handled above. also would suggest removing the else and using a return

useless case, already handled above. also would suggest removing the else and using a return
AKCore commented 2023-06-03 18:09:50 -07:00 (Migrated from github.com)
Review

Fixed this code

Fixed this code
AKCore commented 2023-06-03 18:09:50 -07:00 (Migrated from github.com)
Review

Fixed this code

Fixed this code
const findSessionsController: RequestHandler = (_req, res) => {
console.log("FindSession Request:", JSON.parse(_req.body));
let r = JSON.parse(_req.body);
if (r != undefined) {
AngeloTadeucci commented 2023-06-03 17:57:00 -07:00 (Migrated from github.com)
Review

pls add curly braces everywhere

pls add curly braces everywhere
AngeloTadeucci commented 2023-06-03 17:58:10 -07:00 (Migrated from github.com)
Review

useless case, already handled above. also would suggest removing the else and using a return

useless case, already handled above. also would suggest removing the else and using a return
AKCore commented 2023-06-03 18:09:50 -07:00 (Migrated from github.com)
Review

Fixed this code

Fixed this code
if (r.id != undefined) {
AngeloTadeucci commented 2023-06-03 17:57:00 -07:00 (Migrated from github.com)
Review

pls add curly braces everywhere

pls add curly braces everywhere
AngeloTadeucci commented 2023-06-03 17:58:10 -07:00 (Migrated from github.com)
Review

useless case, already handled above. also would suggest removing the else and using a return

useless case, already handled above. also would suggest removing the else and using a return
AKCore commented 2023-06-03 18:09:50 -07:00 (Migrated from github.com)
Review

Fixed this code

Fixed this code
console.log("Found ID");
let s = getSession(r.id);
if (s) res.json({ queryId: r.queryId, Sessions: s });
else res.json({});
} else if (r != undefined) {
AngeloTadeucci commented 2023-06-03 17:57:00 -07:00 (Migrated from github.com)
Review

pls add curly braces everywhere

pls add curly braces everywhere
AngeloTadeucci commented 2023-06-03 17:58:10 -07:00 (Migrated from github.com)
Review

useless case, already handled above. also would suggest removing the else and using a return

useless case, already handled above. also would suggest removing the else and using a return
AKCore commented 2023-06-03 18:09:50 -07:00 (Migrated from github.com)
Review

Fixed this code

Fixed this code
} else if (r.originalSessionId != undefined) {
AngeloTadeucci commented 2023-06-03 17:57:00 -07:00 (Migrated from github.com)
Review

pls add curly braces everywhere

pls add curly braces everywhere
AngeloTadeucci commented 2023-06-03 17:58:10 -07:00 (Migrated from github.com)
Review

useless case, already handled above. also would suggest removing the else and using a return

useless case, already handled above. also would suggest removing the else and using a return
AKCore commented 2023-06-03 18:09:50 -07:00 (Migrated from github.com)
Review

Fixed this code

Fixed this code
console.log("Found OriginalSessionID");
let s = getSession(r.originalSessionId);

AngeloTadeucci commented 2023-06-03 17:57:00 -07:00 (Migrated from github.com)
Review

pls add curly braces everywhere

pls add curly braces everywhere
AngeloTadeucci commented 2023-06-03 17:57:00 -07:00 (Migrated from github.com)
Review

pls add curly braces everywhere

pls add curly braces everywhere
AngeloTadeucci commented 2023-06-03 17:58:10 -07:00 (Migrated from github.com)
Review

useless case, already handled above. also would suggest removing the else and using a return

useless case, already handled above. also would suggest removing the else and using a return
AngeloTadeucci commented 2023-06-03 17:58:10 -07:00 (Migrated from github.com)
Review

useless case, already handled above. also would suggest removing the else and using a return

useless case, already handled above. also would suggest removing the else and using a return
AKCore commented 2023-06-03 18:09:50 -07:00 (Migrated from github.com)
Review

Fixed this code

Fixed this code
AKCore commented 2023-06-03 18:09:50 -07:00 (Migrated from github.com)
Review

Fixed this code

Fixed this code

View File

@ -1,7 +1,7 @@
import { RequestHandler } from "express";
const getNewRewardSeedController: RequestHandler = (_req, res) => {
res.json({ rewardSeed: 1111111111 });
res.json({ rewardSeed: generateRewardSeed() });
};
function generateRewardSeed(): number {

View File

@ -1,30 +1,4 @@
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
interface Session {
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
sessionId: string;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
creatorId: string;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
maxPlayers: number;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
minPlayers: number;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
privateSlots: number;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
scoreLimit: number;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
timeLimit: number;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
gameModeId: number;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
eloRating: number;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
regionId: number;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
difficulty: number;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
hasStarted: boolean;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
enableVoice: boolean;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
matchType: string;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
maps: string[];
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
originalSessionId: string;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
customSettings: string;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
rewardSeed: number;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
guildId: string;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
buildId: number;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
platform: number;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
xplatform: boolean;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
freePublic: number;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
freePrivate: number;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
fullReset: number;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
}
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
import { Session, FindSessionRequest } from "@/src/types/session";
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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 sessions: Session[] = [];
@ -69,10 +43,6 @@ function getSessionByID(sessionId: string): Session | undefined {
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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 sessions.find(session => session.sessionId === sessionId);
}
interface FindSessionRequest {
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
[key: string]: any;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
}
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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 getSession(sessionIdOrRequest: string | FindSessionRequest): any[] {
if (typeof sessionIdOrRequest === "string") {
const session = sessions.find(session => session.sessionId === sessionIdOrRequest);
@ -130,7 +100,7 @@ function getNewSessionID(): string {
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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) {
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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 (!session) return false;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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 {
const updatedData = JSON.parse(sessionData);
Object.assign(session, updatedData);
@ -139,8 +109,6 @@ function updateSession(sessionId: string, sessionData: string): boolean {
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.");
return false;
}
}
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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;
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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 {

AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 17:59:47 -07:00 (Migrated from github.com)
Review

move interface to another file like /types/session.ts

move interface to another file like /types/session.ts
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:00:43 -07:00 (Migrated from github.com)
Review

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"
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:01:52 -07:00 (Migrated from github.com)
Review

redundant else

redundant else
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AngeloTadeucci commented 2023-06-03 18:03:43 -07:00 (Migrated from github.com)
Review

invert if

invert if
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AKCore commented 2023-06-03 18:12:59 -07:00 (Migrated from github.com)
Review

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
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.
AngeloTadeucci commented 2023-06-03 18:14:44 -07:00 (Migrated from github.com)
Review

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.

27
src/types/session.ts Normal file
View File

@ -0,0 +1,27 @@
export interface Session {
sessionId: string;
creatorId: string;
maxPlayers: number;
minPlayers: number;
privateSlots: number;
scoreLimit: number;
timeLimit: number;
gameModeId: number;
eloRating: number;
regionId: number;
difficulty: number;
hasStarted: boolean;
enableVoice: boolean;
matchType: string;
maps: string[];
originalSessionId: string;
customSettings: string;
rewardSeed: number;
guildId: string;
buildId: number;
platform: number;
xplatform: boolean;
freePublic: number;
freePrivate: number;
fullReset: number;
}