mirror of
https://github.com/discourse/discourse.git
synced 2025-02-15 06:45:40 +08:00
20 lines
543 B
JavaScript
20 lines
543 B
JavaScript
function exportEntityByType(type, entity, args) {
|
|
return Discourse.ajax("/export_csv/export_entity.json", {
|
|
method: 'POST',
|
|
data: {entity_type: type, entity, args}
|
|
});
|
|
}
|
|
|
|
export function exportUserArchive() {
|
|
return exportEntityByType('user', 'user_archive').then(function() {
|
|
bootbox.alert(I18n.t("admin.export_csv.success"));
|
|
}).catch(function() {
|
|
bootbox.alert(I18n.t("admin.export_csv.rate_limit_error"));
|
|
});
|
|
}
|
|
|
|
|
|
export function exportEntity(entity, args) {
|
|
return exportEntityByType('admin', entity, args);
|
|
}
|