approvePost method
- String id
Approves a post with the given id.
Implementation
Future<void> approvePost(String id) async {
instance
.collection('posts')
.doc(id)
.update({"approved": true, "postDate": DateTime.now()}).catchError(
(error) {
debugPrint("Error approving post: $error");
},
);
}