MCPcopy Index your code
hub / github.com/dataease/SQLBot / get_token

Function get_token

frontend/public/swagger-ui-bundle.js:56492–56511  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56490 var prefix = match ? `${match[1]}_` : 'sqlbot_v1_'
56491 return `${prefix}user.token`
56492 }
56493 function get_token() {
56494 var token_key = getTokenKey()
56495 var tokenCache = localStorage.getItem(token_key)
56496 if (!tokenCache) {
56497 return null
56498 }
56499 var result = null
56500 try {
56501 var tokenObj = JSON.parse(tokenCache)
56502 if (tokenObj?.v) {
56503 result = tokenObj.v
56504 if (result?.startsWith('"')) {
56505 result = JSON.parse(result)
56506 }
56507 }
56508 } catch (error) {
56509 return result
56510 }
56511 return result
56512 }
56513 function swagger_client({ configs: s, getConfigs: o }) {
56514 return {

Callers 1

swagger_clientFunction · 0.85

Calls 2

getTokenKeyFunction · 0.85
parseMethod · 0.45

Tested by

no test coverage detected