-
Notifications
You must be signed in to change notification settings - Fork 16
/
connect-flash.express.txt
13 lines (9 loc) · 1.58 KB
/
connect-flash.express.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
CONNECT-FLASH
CONNECT-FLASH() #Express MIDWR (0.1.1) that adds following methods (REQ.session must be available).
REQ.flash(TYPE_STR, #Push MESSAGE_STR[_ARR] to REQ.session.flash.TYPE
MESSAGE_STR[_ARR][, STR3]) #If STR3, uses UTIL.format(MESSAGE_STR, STR3) (cannot use with a MESSAGE_STR_ARR)
#Goal is request-wise short-life logs, to use to pass information across redirections.
REQ.flash(TYPE_STR) #Gets REQ.session.flash.TYPE STR_ARR, then reset it.
REQ.flash() #Gets REQ.session.flash OBJ_STR_ARR, then reset it