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

Method flash

src/session.ts:419–427  ·  view source on GitHub ↗
(key: string | SessionData, value?: AllowedSessionValues)

Source from the content-addressed store, hash-verified

417 flash(key: string, value: AllowedSessionValues): void
418 flash(keyValue: SessionData): void
419 flash(key: string | SessionData, value?: AllowedSessionValues): void {
420 if (typeof key === 'string') {
421 if (value && this.shouldFlashValue(value)) {
422 this.#getFlashStore('write').set(key, value)
423 }
424 } else {
425 this.#getFlashStore('write').merge(this.cleanupFlashData(key))
426 }
427 }
428
429 /**
430 * Flashes errors to the errorsBag. You can read these errors via the "@error" tag.

Callers 10

flashErrorsMethod · 0.95
flashInputErrorsMethod · 0.95
flashValidationErrorsMethod · 0.95
pluginFnFunction · 0.45
contextFunction · 0.45
session.spec.tsFile · 0.45
api_client.spec.tsFile · 0.45

Calls 5

shouldFlashValueMethod · 0.95
#getFlashStoreMethod · 0.95
cleanupFlashDataMethod · 0.95
setMethod · 0.80
mergeMethod · 0.45

Tested by

no test coverage detected