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

@ -19,6 +19,7 @@ import {
PostReportResponse,
PostResponse,
PostView,
PurgeItemResponse,
SortType,
toOption,
UserOperation,
@ -656,6 +657,12 @@ export class Community extends Component<any, State> {
if (data) {
toast(i18n.t("report_created"));
}
} else if (op == UserOperation.PurgeCommunity) {
let data = wsJsonToRes<PurgeItemResponse>(msg, PurgeItemResponse);
if (data.success) {
toast(i18n.t("purge_success"));
this.context.router.history.push(`/`);
}
}
}
}