MCPcopy Create free account
hub / github.com/F12FLASH/CTF / getOrCreateSession

Method getOrCreateSession

12.The Undefined/server/storage.ts:28–38  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

26 }
27
28 private getOrCreateSession(sessionId: string): SessionData {
29 if (!this.sessions.has(sessionId)) {
30 this.sessions.set(sessionId, {
31 progress: { ...INITIAL_PROGRESS },
32 attempts: 0,
33 hints: HINTS.map(h => ({ ...h })),
34 solved: false,
35 });
36 }
37 return this.sessions.get(sessionId)!;
38 }
39
40 async getProgress(sessionId: string): Promise<Progress> {
41 const session = this.getOrCreateSession(sessionId);

Callers 7

getProgressMethod · 0.95
updateProgressMethod · 0.95
getAttemptsMethod · 0.95
incrementAttemptsMethod · 0.95
validateFlagMethod · 0.95
getHintsMethod · 0.95
updateHintsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected