summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-03-03 20:11:31 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-03-03 20:11:31 +0900
commit66eed481ea38200b005fb057be299a18f294a622 (patch)
tree850c55a9ce5070004288ae858f7c744d8f3d0b4d /src
parentFix bug (diff)
downloadsharkey-66eed481ea38200b005fb057be299a18f294a622.tar.gz
sharkey-66eed481ea38200b005fb057be299a18f294a622.tar.bz2
sharkey-66eed481ea38200b005fb057be299a18f294a622.zip
[API] Fix bug
Diffstat (limited to 'src')
-rw-r--r--src/api/endpoints/drive/files.ts2
-rw-r--r--src/api/endpoints/drive/folders.ts2
-rw-r--r--src/api/endpoints/drive/stream.ts2
-rw-r--r--src/api/endpoints/i/notifications.ts2
-rw-r--r--src/api/endpoints/i/signin_history.ts2
-rw-r--r--src/api/endpoints/messaging/messages.ts2
-rw-r--r--src/api/endpoints/posts.ts2
-rw-r--r--src/api/endpoints/posts/mentions.ts2
-rw-r--r--src/api/endpoints/posts/reposts.ts2
-rw-r--r--src/api/endpoints/posts/timeline.ts2
-rw-r--r--src/api/endpoints/users.ts2
-rw-r--r--src/api/endpoints/users/posts.ts2
12 files changed, 12 insertions, 12 deletions
diff --git a/src/api/endpoints/drive/files.ts b/src/api/endpoints/drive/files.ts
index c1441c554b..2600e613e6 100644
--- a/src/api/endpoints/drive/files.ts
+++ b/src/api/endpoints/drive/files.ts
@@ -31,7 +31,7 @@ module.exports = (params, user, app) =>
if (maxIdErr) return rej('invalid max_id param');
// Check if both of since_id and max_id is specified
- if (sinceId !== null && maxId !== null) {
+ if (sinceId && maxId) {
return rej('cannot set since_id and max_id');
}
diff --git a/src/api/endpoints/drive/folders.ts b/src/api/endpoints/drive/folders.ts
index 3f4a5bac0e..45c0117ba0 100644
--- a/src/api/endpoints/drive/folders.ts
+++ b/src/api/endpoints/drive/folders.ts
@@ -31,7 +31,7 @@ module.exports = (params, user, app) =>
if (maxIdErr) return rej('invalid max_id param');
// Check if both of since_id and max_id is specified
- if (sinceId !== null && maxId !== null) {
+ if (sinceId && maxId) {
return rej('cannot set since_id and max_id');
}
diff --git a/src/api/endpoints/drive/stream.ts b/src/api/endpoints/drive/stream.ts
index 6ede044f58..95a7584b15 100644
--- a/src/api/endpoints/drive/stream.ts
+++ b/src/api/endpoints/drive/stream.ts
@@ -30,7 +30,7 @@ module.exports = (params, user) =>
if (maxIdErr) return rej('invalid max_id param');
// Check if both of since_id and max_id is specified
- if (sinceId !== null && maxId !== null) {
+ if (sinceId && maxId) {
return rej('cannot set since_id and max_id');
}
diff --git a/src/api/endpoints/i/notifications.ts b/src/api/endpoints/i/notifications.ts
index 21537ea799..4f4f0780b0 100644
--- a/src/api/endpoints/i/notifications.ts
+++ b/src/api/endpoints/i/notifications.ts
@@ -44,7 +44,7 @@ module.exports = (params, user) =>
if (maxIdErr) return rej('invalid max_id param');
// Check if both of since_id and max_id is specified
- if (sinceId !== null && maxId !== null) {
+ if (sinceId && maxId) {
return rej('cannot set since_id and max_id');
}
diff --git a/src/api/endpoints/i/signin_history.ts b/src/api/endpoints/i/signin_history.ts
index db36438bfe..eb8fc8c23f 100644
--- a/src/api/endpoints/i/signin_history.ts
+++ b/src/api/endpoints/i/signin_history.ts
@@ -30,7 +30,7 @@ module.exports = (params, user) =>
if (maxIdErr) return rej('invalid max_id param');
// Check if both of since_id and max_id is specified
- if (sinceId !== null && maxId !== null) {
+ if (sinceId && maxId) {
return rej('cannot set since_id and max_id');
}
diff --git a/src/api/endpoints/messaging/messages.ts b/src/api/endpoints/messaging/messages.ts
index 81562efbcc..671ed27966 100644
--- a/src/api/endpoints/messaging/messages.ts
+++ b/src/api/endpoints/messaging/messages.ts
@@ -54,7 +54,7 @@ module.exports = (params, user) =>
if (maxIdErr) return rej('invalid max_id param');
// Check if both of since_id and max_id is specified
- if (sinceId !== null && maxId !== null) {
+ if (sinceId && maxId) {
return rej('cannot set since_id and max_id');
}
diff --git a/src/api/endpoints/posts.ts b/src/api/endpoints/posts.ts
index 458f7d3ded..39548d44ae 100644
--- a/src/api/endpoints/posts.ts
+++ b/src/api/endpoints/posts.ts
@@ -36,7 +36,7 @@ module.exports = (params) =>
if (maxIdErr) return rej('invalid max_id param');
// Check if both of since_id and max_id is specified
- if (sinceId !== null && maxId !== null) {
+ if (sinceId && maxId) {
return rej('cannot set since_id and max_id');
}
diff --git a/src/api/endpoints/posts/mentions.ts b/src/api/endpoints/posts/mentions.ts
index 59802c558a..a190b55f1b 100644
--- a/src/api/endpoints/posts/mentions.ts
+++ b/src/api/endpoints/posts/mentions.ts
@@ -36,7 +36,7 @@ module.exports = (params, user) =>
if (maxIdErr) return rej('invalid max_id param');
// Check if both of since_id and max_id is specified
- if (sinceId !== null && maxId !== null) {
+ if (sinceId && maxId) {
return rej('cannot set since_id and max_id');
}
diff --git a/src/api/endpoints/posts/reposts.ts b/src/api/endpoints/posts/reposts.ts
index d8410b322b..0c1fa9bbd1 100644
--- a/src/api/endpoints/posts/reposts.ts
+++ b/src/api/endpoints/posts/reposts.ts
@@ -34,7 +34,7 @@ module.exports = (params, user) =>
if (maxIdErr) return rej('invalid max_id param');
// Check if both of since_id and max_id is specified
- if (sinceId !== null && maxId !== null) {
+ if (sinceId && maxId) {
return rej('cannot set since_id and max_id');
}
diff --git a/src/api/endpoints/posts/timeline.ts b/src/api/endpoints/posts/timeline.ts
index 5744084932..c599c4ded7 100644
--- a/src/api/endpoints/posts/timeline.ts
+++ b/src/api/endpoints/posts/timeline.ts
@@ -32,7 +32,7 @@ module.exports = (params, user, app) =>
if (maxIdErr) return rej('invalid max_id param');
// Check if both of since_id and max_id is specified
- if (sinceId !== null && maxId !== null) {
+ if (sinceId && maxId) {
return rej('cannot set since_id and max_id');
}
diff --git a/src/api/endpoints/users.ts b/src/api/endpoints/users.ts
index 74c4754fed..7f9fa69df8 100644
--- a/src/api/endpoints/users.ts
+++ b/src/api/endpoints/users.ts
@@ -29,7 +29,7 @@ module.exports = (params, me) =>
if (maxIdErr) return rej('invalid max_id param');
// Check if both of since_id and max_id is specified
- if (sinceId !== null && maxId !== null) {
+ if (sinceId && maxId) {
return rej('cannot set since_id and max_id');
}
diff --git a/src/api/endpoints/users/posts.ts b/src/api/endpoints/users/posts.ts
index 526ed1ee1b..770831c426 100644
--- a/src/api/endpoints/users/posts.ts
+++ b/src/api/endpoints/users/posts.ts
@@ -51,7 +51,7 @@ module.exports = (params, me) =>
if (maxIdErr) return rej('invalid max_id param');
// Check if both of since_id and max_id is specified
- if (sinceId !== null && maxId !== null) {
+ if (sinceId && maxId) {
return rej('cannot set since_id and max_id');
}