MCPcopy Create free account
hub / github.com/bugy/script-server / onSuccess

Function onSuccess

web-src/src/login/login.js:187–203  ·  view source on GitHub ↗
(response)

Source from the content-addressed store, hash-verified

185 }
186
187 const onSuccess = function (response) {
188 hideError();
189 hideInfo();
190 getLoginButton().removeAttribute('disabled');
191
192 var redirect = response.headers['location']
193 if (!redirect) {
194 showError('Invalid server response. Please contact the administrator');
195 return;
196 }
197
198 if (nextUrlFragment) {
199 redirect += nextUrlFragment;
200 }
201
202 window.location = redirect;
203 };
204
205 const onError = function (error) {
206 const status = get(error, 'response.status');

Callers

nothing calls this directly

Calls 4

hideErrorFunction · 0.85
hideInfoFunction · 0.85
getLoginButtonFunction · 0.85
showErrorFunction · 0.85

Tested by

no test coverage detected