Update Report Status
To update the status of pending posts, use the updateReportStatus
function. This function allows moderators to change the status of reported posts.
Steps to Update Report Status
- Use the
updateReportStatus()
function provided by thelmFeedClient
object. - Create an instance of
UpdateReportStatusRequest
, as shown in the snippet, and pass it to the above method. - Use the response as per your requirement.
import UpdateReportStatusRequest from "../requests/UpdateReportStatusRequest";
try {
const updateReportStatusRequest =
UpdateReportStatusRequest.builder()
.setReportIds(reportIds) // Array of report IDs
.setActionTaken(actionTaken) // Action to take on the reports
.build();
const response = await lmFeedClient.updateReportStatus(
updateReportStatusRequest
);
// Use the response as per your requirement.
} catch (error) {
// Handle the error as per your requirement.
}
Models
UpdateReportStatusRequest
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
reportIds | number[] | Array of report IDs | |
actionTaken | LMFeedReportStatus | Action to take |
LMFeedReportStatus
VARIABLE | VALUE |
---|---|
EDIT_MEMBER_PERMISSION | 0 |
PENDING_POST_APPROVED | 7 |
PENDING_POST_REJECTED | 8 |
POST_APPROVED | 9 |
POST_REJECTED | 10 |
COMMENT_APPROVED | 11 |
COMMENT_REJECTED | 12 |