Adding purging of comments, posts, communities, and users. (#459)

* Starting on admin purge.

* Updating translations.

* Finishing up item purging.
This commit is contained in:
Dessalines 2022-06-23 15:44:05 -04:00 committed by GitHub
parent 75d52f1e4e
commit 96583bee47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 578 additions and 88 deletions

View file

@ -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(`/`);
}
}
}
}