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

Method get

src/session_collection.ts:82–85  ·  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

80 * const data = await sessionCollection.get('sess_abc123')
81 */
82 async get(sessionId: string): Promise<SessionData | null> {
83 debug('session collection: getting session data %s', sessionId)
84 return this.#store.read(sessionId)
85 }
86
87 /**
88 * Destroys a session by its ID

Callers

nothing calls this directly

Calls 1

readMethod · 0.65

Tested by

no test coverage detected