summaryrefslogtreecommitdiff
path: root/src/api/endpoints/messaging
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-03-04 04:28:38 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-03-04 04:28:38 +0900
commit3c1b92baa1ac15c23fe63e2f50739105252ca516 (patch)
tree35a0ae58802891f05209c83e780440775075e088 /src/api/endpoints/messaging
parentMerge pull request #233 from syuilo/greenkeeper/inquirer-3.0.6 (diff)
downloadsharkey-3c1b92baa1ac15c23fe63e2f50739105252ca516.tar.gz
sharkey-3c1b92baa1ac15c23fe63e2f50739105252ca516.tar.bz2
sharkey-3c1b92baa1ac15c23fe63e2f50739105252ca516.zip
Follow linter
Diffstat (limited to 'src/api/endpoints/messaging')
-rw-r--r--src/api/endpoints/messaging/history.ts6
-rw-r--r--src/api/endpoints/messaging/messages.ts6
-rw-r--r--src/api/endpoints/messaging/messages/create.ts6
-rw-r--r--src/api/endpoints/messaging/unread.ts6
4 files changed, 4 insertions, 20 deletions
diff --git a/src/api/endpoints/messaging/history.ts b/src/api/endpoints/messaging/history.ts
index 07ad6e0f22..73d7af77a5 100644
--- a/src/api/endpoints/messaging/history.ts
+++ b/src/api/endpoints/messaging/history.ts
@@ -1,5 +1,3 @@
-'use strict';
-
/**
* Module dependencies
*/
@@ -14,9 +12,7 @@ import serialize from '../../serializers/messaging-message';
* @param {any} user
* @return {Promise<any>}
*/
-module.exports = (params, user) =>
- new Promise(async (res, rej) =>
-{
+module.exports = (params, user) => new Promise(async (res, rej) => {
// Get 'limit' parameter
const [limit, limitErr] = it(params.limit).expect.number().range(1, 100).default(10).qed();
if (limitErr) return rej('invalid limit param');
diff --git a/src/api/endpoints/messaging/messages.ts b/src/api/endpoints/messaging/messages.ts
index 671ed27966..40fd0cf047 100644
--- a/src/api/endpoints/messaging/messages.ts
+++ b/src/api/endpoints/messaging/messages.ts
@@ -1,5 +1,3 @@
-'use strict';
-
/**
* Module dependencies
*/
@@ -17,9 +15,7 @@ import { publishMessagingStream } from '../../event';
* @param {any} user
* @return {Promise<any>}
*/
-module.exports = (params, user) =>
- new Promise(async (res, rej) =>
-{
+module.exports = (params, user) => new Promise(async (res, rej) => {
// Get 'user_id' parameter
const [recipientId, recipientIdErr] = it(params.user_id).expect.id().required().qed();
if (recipientIdErr) return rej('invalid user_id param');
diff --git a/src/api/endpoints/messaging/messages/create.ts b/src/api/endpoints/messaging/messages/create.ts
index dbe7f617fa..81968c8979 100644
--- a/src/api/endpoints/messaging/messages/create.ts
+++ b/src/api/endpoints/messaging/messages/create.ts
@@ -1,5 +1,3 @@
-'use strict';
-
/**
* Module dependencies
*/
@@ -21,9 +19,7 @@ import config from '../../../../conf';
* @param {any} user
* @return {Promise<any>}
*/
-module.exports = (params, user) =>
- new Promise(async (res, rej) =>
-{
+module.exports = (params, user) => new Promise(async (res, rej) => {
// Get 'user_id' parameter
const [recipientId, recipientIdErr] = it(params.user_id).expect.id().required().qed();
if (recipientIdErr) return rej('invalid user_id param');
diff --git a/src/api/endpoints/messaging/unread.ts b/src/api/endpoints/messaging/unread.ts
index faba171bdc..40bc83fe1c 100644
--- a/src/api/endpoints/messaging/unread.ts
+++ b/src/api/endpoints/messaging/unread.ts
@@ -1,5 +1,3 @@
-'use strict';
-
/**
* Module dependencies
*/
@@ -12,9 +10,7 @@ import Message from '../../models/messaging-message';
* @param {any} user
* @return {Promise<any>}
*/
-module.exports = (params, user) =>
- new Promise(async (res, rej) =>
-{
+module.exports = (params, user) => new Promise(async (res, rej) => {
const count = await Message
.count({
recipient_id: user._id,