MCPcopy Create free account
hub / github.com/adonisjs/session / get

Method get

src/session_collection.ts:74–77  ·  view source on GitHub ↗

* Returns the session data for the given session ID, * or null if the session does not exist * * @param sessionId - Session identifier * * @example * const data = await sessionCollection.get('sess_abc123')

(sessionId: string)

Source from the content-addressed store, hash-verified

72 * const data = await sessionCollection.get('sess_abc123')
73 */
74 async get(sessionId: string): Promise<SessionData | null> {
75 debug('session collection: getting session data %s', sessionId)
76 return this.#store.read(sessionId)
77 }
78
79 /**
80 * Destroys a session by its ID

Callers

nothing calls this directly

Calls 1

readMethod · 0.65

Tested by

no test coverage detected