Update Pending Post Status
To update the status of pending posts, use the updatePendingPostStatus
function. This function allows moderators to change the status of reported posts.
Steps to Update Pending Post Status
- Use the
updatePendingPostStatus()
function provided by thelmFeedClient
object. - Create an instance of
UpdatePendingPostStatusRequest
, as shown in the snippet, and pass it to the above method. - Use the response as per your requirement.
import UpdatePendingPostStatusRequest from "../requests/updatePendingPostStatusRequest";
try {
const updatePendingPostStatusRequest =
UpdatePendingPostStatusRequest.builder()
.setReportIds(reportIds) // Array of report IDs
.setStatus(status) // New status to update
.build();
const response = await lmFeedClient.updatePendingPostStatus(
updatePendingPostStatusRequest
);
// Use the response as per your requirement.
} catch (error) {
// Handle the error as per your requirement.
}
Models
UpdatePendingPostStatusRequest
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
reportIds | number[] | Array of report IDs | |
status | LMFeedReportStatus | New status to update |
LMFeedReportStatus
VARIABLE | VALUE |
---|---|
APPROVED | approved |
REJECTED | rejected |