basic session management completed #11

Merged
AKCore merged 9 commits from main into main 2023-06-03 19:24:57 -07:00
2 changed files with 12 additions and 12 deletions
Showing only changes of commit ad55d2f09a - Show all commits

View File

@ -3,24 +3,24 @@ 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) => { const findSessionsController: RequestHandler = (_req, res) => {
console.log("FindSession Request:", JSON.parse(_req.body)); console.log("FindSession Request:", JSON.parse(_req.body));
let r = JSON.parse(_req.body); let req = JSON.parse(_req.body);
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
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) { if (req.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
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"); console.log("Found ID");
let s = getSession(r.id); let session = getSession(req.id);
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
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 (s) res.json({ queryId: r.queryId, Sessions: s }); if (session) res.json({ queryId: req.queryId, Sessions: session });
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
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 res.json({}); else res.json({});
} else if (r.originalSessionId != undefined) { } else if (req.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
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"); console.log("Found OriginalSessionID");
let s = getSession(r.originalSessionId); let session = getSession(req.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: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
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 (s) res.json({ queryId: r.queryId, Sessions: [s] }); if (session) res.json({ queryId: req.queryId, Sessions: session });
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
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 res.json({}); else res.json({});
} else { } else {
console.log("Found SessionRequest"); console.log("Found SessionRequest");
let s = getSession(_req.body); let session = getSession(_req.body);
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
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 (s) res.json({ queryId: r.queryId, Sessions: [s] }); if (session) res.json({ queryId: req.queryId, Sessions: session });
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
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 res.json({}); else res.json({});
} }
}; };

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

@ -3,9 +3,9 @@ import { getSessionByID } from "@/src/managers/sessionManager";
const joinSessionController: RequestHandler = (_req, res) => { const joinSessionController: RequestHandler = (_req, res) => {
console.log("JoinSession Request:", JSON.parse(_req.body)); console.log("JoinSession Request:", JSON.parse(_req.body));
let r = JSON.parse(_req.body); let req = JSON.parse(_req.body);
let s = getSessionByID(r.sessionIds[0]); let session = getSessionByID(req.sessionIds[0]);
res.json({ rewardSeed: s?.rewardSeed, sessionId: { $oid: s?.sessionId } }); res.json({ rewardSeed: session?.rewardSeed, sessionId: { $oid: session?.sessionId } });
}; };
export { joinSessionController }; export { joinSessionController };