getSession method

dynamic getSession(
  1. dynamic key
)

Implementation

dynamic getSession(key){
  if(req?.session[key] != ''){
    return req?.session[key];
  }
}