packages/example/front/js/reset-password.js
async function askResetPassword(form) {
  await client.connect();

  try {
    await api.askResetPassword(
      {
        login: form.login.value
      },
      "user"
    );
    displayMessage(
      "Reset password",
      "A link was sent to reset your password",
      "is-success"
    );
    goTo("login");
  } catch (e) {
    displayMessage(
      "Reset password",
      `Failed to send the link to reset your password. Cause: ${e.message}`,
      "is-danger"
    );
  }
}
async function askResetPassword(form) {
  await client.connect();

  try {
    await api.askResetPassword(
      {
        login: form.login.value
      },
      "user"
    );
    displayMessage(
      "Reset password",
      "A link was sent to reset your password",
      "is-success"
    );
    goTo("login");
  } catch (e) {
    displayMessage(
      "Reset password",
      `Failed to send the link to reset your password. Cause: ${e.message}`,
      "is-danger"
    );
  }
}
async function askResetPassword ( form ) { await client . connect ( ) ; try { await api . askResetPassword ( { login : form . login . value } , "user" ) ; displayMessage ( "Reset password" , "A link was sent to reset your password" , "is-success" ) ; goTo ( "login" ) ; } catch ( e ) { displayMessage ( "Reset password" , ` ${ e . message } ` , "is-danger" ) ; } }
Ask reset password
Ask reset password