summaryrefslogtreecommitdiff
path: root/src/api/endpoints/posts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/endpoints/posts')
-rw-r--r--src/api/endpoints/posts/create.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/api/endpoints/posts/create.js b/src/api/endpoints/posts/create.js
index 151938004d..92aeb3d08e 100644
--- a/src/api/endpoints/posts/create.js
+++ b/src/api/endpoints/posts/create.js
@@ -4,6 +4,7 @@
* Module dependencies
*/
import validate from '../../validator';
+import hasDuplicates from '../../../common/has-duplicates';
import parse from '../../../common/text';
import { Post, isValidText } from '../../models/post';
import User from '../../models/user';
@@ -15,10 +16,6 @@ import notify from '../../common/notify';
import event from '../../event';
import config from '../../../conf';
-function hasDuplicates(array) {
- return (new Set(array)).size !== array.length;
-}
-
/**
* Create a post
*