Files
CollabTable/shared/packages/media-shared-assets/public/js/auth/auth-reset-perform.js
T

24 lines
570 B
JavaScript
Raw Normal View History

(() => {
const tokenInput = document.getElementById('token');
const passwordInput = document.getElementById('newPassword');
if (
!tokenInput ||
!passwordInput ||
!window.NCAuthForm ||
typeof window.NCAuthForm.bindJsonSubmit !== 'function'
) {
return;
}
window.NCAuthForm.bindJsonSubmit({
endpoint: '/auth/reset/perform',
formId: 'resetForm',
resultId: 'resetDone',
buildPayload() {
return {
token: tokenInput.value,
password: passwordInput.value,
};
},
});
})();