src/static/js/admin-status.js
// Populate data on the user status change requests page
Populate data on the user status change requests page
Populate data on the user status change requests page
async function populateStatuses() {
  const statusesURL = "/api/statusChangeRequests";
  let statuses = null;
  try {
    statuses = await fetchJSON(statusesURL);
  } catch (err) {
    showError("Failed to update status change requests");
  }
  if (statuses) {
    hideError();
    hideElement("status-status");
    clearElement("requested-statuses");
    for (const user of statuses) {
      const newItem = createStatusRow(user);
      appendTo("requested-statuses", newItem);
    }
  }
}
async function populateStatuses ( ) { const statusesURL = "/api/statusChangeRequests" ; let statuses = null ; try { statuses = await fetchJSON ( statusesURL ) ; } catch ( err ) { showError ( "Failed to update status change requests" ) ; } if ( statuses ) { hideError ( ) ; hideElement ( "status-status" ) ; clearElement ( "requested-statuses" ) ; for ( const user of statuses ) { const newItem = createStatusRow ( user ) ; appendTo ( "requested-statuses" , newItem ) ; } } }
Populate data on the user status change requests page
Populate data on the user status change requests page