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

Method flashExcept

src/session.ts:546–556  ·  view source on GitHub ↗

* Flashes form input data (except some keys) to the flash messages store * * @param keys - Array of keys to exclude from flashing * * @example * session.flashExcept(['password', '_csrf'])

(keys: string[])

Source from the content-addressed store, hash-verified

544 * session.flashExcept(['password', '_csrf'])
545 */
546 flashExcept(keys: string[]): void {
547 this.#getFlashStore('write').set(
548 'input',
549 lodash.omitBy(this.#ctx.request.original(), (value, key) => {
550 if (keys.includes(key)) {
551 return true
552 }
553 return !this.shouldFlashValue(value)
554 })
555 )
556 }
557
558 /**
559 * Flashes form input data (only some keys) to the flash messages store

Callers 2

flashValidationErrorsMethod · 0.95
session.spec.tsFile · 0.80

Calls 3

#getFlashStoreMethod · 0.95
shouldFlashValueMethod · 0.95
setMethod · 0.80

Tested by

no test coverage detected