Merge branch '28225_not_loading' into 'master'
28225_not_loading See merge request !63
Showing
1 changed file
with
0 additions
and
19 deletions
| ... | @@ -56,27 +56,8 @@ function App() { | ... | @@ -56,27 +56,8 @@ function App() { |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | async function handleSubmit(e){ | 58 | async function handleSubmit(e){ |
| 59 | e.preventDefault(); | ||
| 60 | let aiUser = window.btutil_getCookie('aiwp_logged_in'); | ||
| 61 | if(!aiUser) { | ||
| 62 | window.location.href = process.env.REACT_APP_AUTH_FAILED_REDIRECTION_URL; | ||
| 63 | return; | ||
| 64 | } else { | ||
| 65 | let objBody = { aiwp_logged_in: aiUser }; | ||
| 66 | |||
| 67 | let params = []; | ||
| 68 | params['objBody'] = objBody; | ||
| 69 | params['strUrl'] = process.env.REACT_APP_EXTERNAL_API_URL + '/e/v1/authenticate/'; | ||
| 70 | |||
| 71 | window.btutil_checkAuthentication(params, function(res) { | ||
| 72 | if (!res.success) { | ||
| 73 | window.location.href = process.env.REACT_APP_AUTH_FAILED_REDIRECTION_URL; | ||
| 74 | } else { | ||
| 75 | submitPrompt(); | 59 | submitPrompt(); |
| 76 | } | 60 | } |
| 77 | }, function(res) {}); | ||
| 78 | } | ||
| 79 | } | ||
| 80 | 61 | ||
| 81 | async function submitPrompt() { | 62 | async function submitPrompt() { |
| 82 | const userInput = ['what', 'why', 'when', 'where' , 'which', 'did', 'do', 'how', 'can', 'are', 'who']; | 63 | const userInput = ['what', 'why', 'when', 'where' , 'which', 'did', 'do', 'how', 'can', 'are', 'who']; | ... | ... |
-
Please register or sign in to post a comment