src/static/js/admin-registration.js
// Populate data on the registration approval page
Populate data on the registration approval page
Populate data on the registration approval page
async function populateRegistration() {
  const registrationURL = "/api/unapprovedUsers";
  let unapproved = null;
  try {
    unapproved = await fetchJSON(registrationURL);
  } catch (err) {
    showError("Failed to update users");
  }
  if (unapproved) {
    hideError();
    hideElement("registration-status");
    clearElement("unapproved-registration");
    for (const user of unapproved) {
      const newItem = createUserRow(user);
      appendTo("unapproved-registration", newItem);
    }
  }
}
async function populateRegistration ( ) { const registrationURL = "/api/unapprovedUsers" ; let unapproved = null ; try { unapproved = await fetchJSON ( registrationURL ) ; } catch ( err ) { showError ( "Failed to update users" ) ; } if ( unapproved ) { hideError ( ) ; hideElement ( "registration-status" ) ; clearElement ( "unapproved-registration" ) ; for ( const user of unapproved ) { const newItem = createUserRow ( user ) ; appendTo ( "unapproved-registration" , newItem ) ; } } }
Populate data on the registration approval page
Populate data on the registration approval page