This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/lib/user-activation.js
2020-03-12 13:29:55 -04:00

15 lines
442 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" });
}