discourse/app/assets/javascripts/discourse/lib/user-activation.js.es6

16 lines
443 B
JavaScript

import { ajax } from 'discourse/lib/ajax';
import { popupAjaxError } from 'discourse/lib/ajax-error';
import { userPath } from 'discourse/lib/url';
export function resendActivationEmail(username) {
return ajax(userPath('action/send_activation_email'), {
type: 'POST',
data: { username }
}).catch(popupAjaxError);
}
export function changeEmail(data) {
return ajax(userPath('update-activation-email'), { data, type: 'PUT' });
}