MCPcopy Create free account
hub / github.com/6dylan6/jdpro / __lt

Method __lt

function/magic.js:665–708  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

663 }
664
665 __lt(data) {
666 if (this.appId.length !== 2) {
667 return
668 }
669 let scs = data?.headers['set-cookie'] || data?.headers['Set-Cookie']
670 || ''
671 if (!scs) {
672 if (data?.data?.LZ_TOKEN_KEY && data?.data?.LZ_TOKEN_VALUE) {
673 this.lz = `LZ_TOKEN_KEY=${data.data.LZ_TOKEN_KEY};LZ_TOKEN_VALUE=${data.data.LZ_TOKEN_VALUE};`;
674 }
675 return;
676 }
677 let LZ_TOKEN_KEY = '', LZ_TOKEN_VALUE = '', JSESSIONID = '',
678 jcloud_alb_route = '', ci_session = ''
679 let sc = typeof scs != 'object' ? scs.split(',') : scs
680 for (let ck of sc) {
681 let name = ck.split(";")[0].trim()
682 if (name.split("=")[1]) {
683 name.includes('LZ_TOKEN_KEY=') ? LZ_TOKEN_KEY = name.replace(
684 / /g, '') + ';' : ''
685 name.includes('LZ_TOKEN_VALUE=')
686 ? LZ_TOKEN_VALUE = name.replace(/ /g, '') + ';' : ''
687 name.includes('JSESSIONID=') ? JSESSIONID = name.replace(/ /g,
688 '') + ';' : ''
689 name.includes('jcloud_alb_route=')
690 ? jcloud_alb_route = name.replace(/ /g, '') + ';' : ''
691 name.includes('ci_session=') ? ci_session = name.replace(/ /g,
692 '') + ';' : ''
693 }
694 }
695 if (JSESSIONID && LZ_TOKEN_KEY && LZ_TOKEN_VALUE) {
696 this.lz = `${JSESSIONID}${LZ_TOKEN_KEY}${LZ_TOKEN_VALUE}`
697 } else if (LZ_TOKEN_KEY && LZ_TOKEN_VALUE) {
698 this.lz = `${LZ_TOKEN_KEY}${LZ_TOKEN_VALUE}`
699 } else if (JSESSIONID && jcloud_alb_route) {
700 this.lz = `${JSESSIONID}${jcloud_alb_route}`
701 } else if (JSESSIONID) {
702 this.lz = `${JSESSIONID}`
703 }
704 if (ci_session) {
705 this.lz = `${ci_session}`
706 }
707 // testMode ? this.log('lz', this.lz) : ''
708 }
709
710 handler(res) {
711 let data = res?.data || res?.body || res;

Callers 1

requestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected