mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 04:04:18 +00:00 
			
		
		
		
	Can delete comments
This commit is contained in:
		@@ -37,6 +37,15 @@ class CommentsHelper {
 | 
			
		||||
    return apiToComment(response.getObject());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /// Attempt to delete a comment
 | 
			
		||||
  Future<bool> delete(int id) async {
 | 
			
		||||
    return (await APIRequest(
 | 
			
		||||
      uri: "comments/delete",
 | 
			
		||||
      needLogin: true,
 | 
			
		||||
      args: {"commentID": id.toString()},
 | 
			
		||||
    ).exec()).code == 200;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /// Turn an API entry into a [Comment] object
 | 
			
		||||
  static Comment apiToComment(Map<String, dynamic> entry) {
 | 
			
		||||
    return Comment(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user