add an ending comma in console.xxx({_at,...}, '\n,')
				
					
				
			This commit is contained in:
		
							parent
							
								
									ff499ffa4d
								
							
						
					
					
						commit
						2b97caa457
					
				@ -10,7 +10,7 @@ module.exports = {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  createToken (content, key = my.envar?.tokenKey || wo?.envar?.tokenKey) {
 | 
					  createToken (content, key = my.envar?.tokenKey || wo?.envar?.tokenKey) {
 | 
				
			||||||
    if (!key) {
 | 
					    if (!key) {
 | 
				
			||||||
      console.warn({ _at: new Date().toJSON(), about: '*** tokenkey is empty! ***' })
 | 
					      console.warn({ _at: new Date().toJSON(), about: '*** tokenkey is empty! ***' }, '\n,')
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    // content 可以是数字,非空字符串或非空对象,不可以是数组。
 | 
					    // content 可以是数字,非空字符串或非空对象,不可以是数组。
 | 
				
			||||||
    // key 可以未定义,则默认设为空字符串,再转化为哈希。(jsonwebtoken 要求 key 必须有值)
 | 
					    // key 可以未定义,则默认设为空字符串,再转化为哈希。(jsonwebtoken 要求 key 必须有值)
 | 
				
			||||||
@ -28,7 +28,7 @@ module.exports = {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  verifyToken (token, key = my.envar?.tokenKey || wo?.envar?.tokenKey) {
 | 
					  verifyToken (token, key = my.envar?.tokenKey || wo?.envar?.tokenKey) {
 | 
				
			||||||
    if (!key) {
 | 
					    if (!key) {
 | 
				
			||||||
      console.warn({ _at: new Date().toJSON(), about: '*** tokenkey is empty! ***' })
 | 
					      console.warn({ _at: new Date().toJSON(), about: '*** tokenkey is empty! ***' }, '\n,')
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (!token) {
 | 
					    if (!token) {
 | 
				
			||||||
      return null
 | 
					      return null
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user