mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-28 00:13:07 +02:00
[API] Fix bug
This commit is contained in:
parent
ee6c7129e9
commit
66eed481ea
12 changed files with 12 additions and 12 deletions
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue