import apiRequest from '../apiBase/apiRequest';

const remove = (apiOptions, fullname, spam) => {
    // Remove a link, comment, or modmail message.
    const body = {
    	id: fullname,
    	spam: spam
    };

    return apiRequest(apiOptions, 'POST', 'api/remove', { body, type: 'form' });
}

const approve = (apiOptions, fullname) => {
    // Approve a link or comment
    const body = { id: fullname };
    return apiRequest(apiOptions, 'POST', 'api/approve', { body, type: 'form' });
}

export default { remove, approve }
@@ -42,16 +42,104 @@
 uest';%0A%0A
+const DISTINGUISH_TYPES = %7B%0A  NONE: '',%0A  MODERATOR: 'moderator',%0A  ADMIN: 'admin',%0A%7D;%0A%0A
 const re
@@ -175,26 +175,24 @@
  spam) =%3E %7B%0A
-  
   // Remove 
@@ -228,18 +228,16 @@
 essage.%0A
-  
   const 
@@ -249,17 +249,16 @@
 = %7B%0A    
-%09
 id: full
@@ -271,9 +271,8 @@
     
-%09
 spam
@@ -284,16 +284,12 @@
 m%0A  
- 
- 
 %7D;%0A%0A
-  
   re
@@ -410,18 +410,16 @@
 e) =%3E %7B%0A
-  
   // App
@@ -443,18 +443,16 @@
 mment%0A  
- 
- 
 const bo
@@ -474,18 +474,16 @@
 name %7D;%0A
-  
   return
@@ -561,38 +561,324 @@
 %0A%7D%0A%0A
-export default %7B remove, approve
+const distinguish = (apiOptions, fullname, distinguishType) =%3E %7B%0A  // Distinguish a link or comment%0A  const body = %7B%0A    how: distinguishType,%0A    id: fullname,%0A  %7D;%0A  return apiRequest(apiOptions, 'POST', 'api/distinguish', %7B body, type: 'form' %7D);%0A%7D%0A%0Aexport default %7B remove, approve, distinguish, DISTINGUISH_TYPES
  %7D
+%0A

Add distingiush endpoint to modtools