Adding purging of comments, posts, communities, and users. (#459)
* Starting on admin purge. * Updating translations. * Finishing up item purging.
This commit is contained in:
parent
75d52f1e4e
commit
96583bee47
13 changed files with 578 additions and 88 deletions
|
@ -21,6 +21,7 @@ import {
|
|||
PostReportResponse,
|
||||
PostResponse,
|
||||
PostView,
|
||||
PurgeItemResponse,
|
||||
SiteResponse,
|
||||
SortType,
|
||||
UserOperation,
|
||||
|
@ -860,6 +861,17 @@ export class Home extends Component<any, HomeState> {
|
|||
if (data) {
|
||||
toast(i18n.t("report_created"));
|
||||
}
|
||||
} else if (
|
||||
op == UserOperation.PurgePerson ||
|
||||
op == UserOperation.PurgePost ||
|
||||
op == UserOperation.PurgeComment ||
|
||||
op == UserOperation.PurgeCommunity
|
||||
) {
|
||||
let data = wsJsonToRes<PurgeItemResponse>(msg, PurgeItemResponse);
|
||||
if (data.success) {
|
||||
toast(i18n.t("purge_success"));
|
||||
this.context.router.history.push(`/`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue