mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 21:16:42 +08:00
14 lines
365 B
JavaScript
14 lines
365 B
JavaScript
![]() |
import { ajax } from "discourse/lib/ajax";
|
||
|
import RestModel from "discourse/models/rest";
|
||
|
|
||
|
export default class UserExport extends RestModel {
|
||
|
static async findLatest(user_id) {
|
||
|
const result = await ajax(
|
||
|
`/export_csv/latest_user_archive/${user_id}.json`
|
||
|
);
|
||
|
if (result !== null) {
|
||
|
return UserExport.create(result.user_export);
|
||
|
}
|
||
|
}
|
||
|
}
|