MCPcopy Index your code
hub / github.com/caesarHQ/textSQL / getSession

Function getSession

client/censusGPT/src/App.js:162–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160 }
161
162 const getSession = async () => {
163 const options = {
164 method: 'POST',
165 headers: { 'content-type': 'application/json' },
166 body: JSON.stringify({
167 user_id: userId,
168 scope: props.version === 'San Francisco' ? 'SF' : 'USA',
169 }),
170 }
171
172 fetch(api_endpoint + '/api/session', options)
173 .then((response) => response.json())
174 .then((response) => {
175 sessionId = response.session_id
176 })
177 .catch((error) => {
178 console.log('error', error)
179 capturePosthog('backend_error', error)
180 })
181 }
182
183 const getSuggestionForFailedQuery = async () => {
184 currentSuggestionId = null

Callers 1

App.jsFile · 0.85

Calls 1

capturePosthogFunction · 0.90

Tested by

no test coverage detected