MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / areThereAnyUsers

Function areThereAnyUsers

client/src/actions/user.js:453–475  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

451}
452
453export function areThereAnyUsers() {
454 const url = `${API_HOST}/app/users`;
455 const method = "GET";
456 const headers = new Headers({
457 "Accept": "application/json",
458 "Content-Type": "application/json",
459 });
460
461 return fetch(url, { method, headers })
462 .then((response) => {
463 if (!response.ok) {
464 return new Promise((resolve, reject) => reject(response.statusText));
465 }
466
467 return response.json();
468 })
469 .then((result) => {
470 return result.areThereAnyUsers;
471 })
472 .catch((err) => {
473 return err;
474 });
475}
476
477export function requestEmailUpdate(id, email) {
478 const token = cookie.load("brewToken");

Callers 1

MainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected