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

Method flash

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

Source from the content-addressed store, hash-verified

406 flash(key: string, value: AllowedSessionValues): void
407 flash(keyValue: SessionData): void
408 flash(key: string | SessionData, value?: AllowedSessionValues): void {
409 if (typeof key === 'string') {
410 if (value && this.shouldFlashValue(value)) {
411 this.#getFlashStore('write').set(key, value)
412 }
413 } else {
414 this.#getFlashStore('write').merge(this.cleanupFlashData(key))
415 }
416 }
417
418 /**
419 * Flashes errors to the errorsBag. You can read these errors via the "@error" tag.

Callers 9

flashErrorsMethod · 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