Fix English grammatical error
This commit is contained in:
parent
f0776a80fc
commit
86c60f045f
|
@ -40,7 +40,7 @@ module.exports = (params, user, app) =>
|
||||||
let text = params.text;
|
let text = params.text;
|
||||||
if (text !== undefined && text !== null) {
|
if (text !== undefined && text !== null) {
|
||||||
if (typeof text != 'string') {
|
if (typeof text != 'string') {
|
||||||
return rej('text is must be a string');
|
return rej('text must be a string');
|
||||||
}
|
}
|
||||||
text = text.trim();
|
text = text.trim();
|
||||||
if (text.length == 0) {
|
if (text.length == 0) {
|
||||||
|
@ -57,7 +57,7 @@ module.exports = (params, user, app) =>
|
||||||
let files = [];
|
let files = [];
|
||||||
if (medias !== undefined && medias !== null) {
|
if (medias !== undefined && medias !== null) {
|
||||||
if (!Array.isArray(medias)) {
|
if (!Array.isArray(medias)) {
|
||||||
return rej('media_ids is must be an array');
|
return rej('media_ids must be an array');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (medias.length > maxMediaCount) {
|
if (medias.length > maxMediaCount) {
|
||||||
|
@ -74,7 +74,7 @@ module.exports = (params, user, app) =>
|
||||||
const media = medias[i];
|
const media = medias[i];
|
||||||
|
|
||||||
if (typeof media != 'string') {
|
if (typeof media != 'string') {
|
||||||
return rej('media id is must be a string');
|
return rej('media id must be a string');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate id
|
// Validate id
|
||||||
|
@ -105,7 +105,7 @@ module.exports = (params, user, app) =>
|
||||||
let repost = params.repost_id;
|
let repost = params.repost_id;
|
||||||
if (repost !== undefined && repost !== null) {
|
if (repost !== undefined && repost !== null) {
|
||||||
if (typeof repost != 'string') {
|
if (typeof repost != 'string') {
|
||||||
return rej('repost_id is must be a string');
|
return rej('repost_id must be a string');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate id
|
// Validate id
|
||||||
|
@ -155,7 +155,7 @@ module.exports = (params, user, app) =>
|
||||||
let replyTo = params.reply_to_id;
|
let replyTo = params.reply_to_id;
|
||||||
if (replyTo !== undefined && replyTo !== null) {
|
if (replyTo !== undefined && replyTo !== null) {
|
||||||
if (typeof replyTo != 'string') {
|
if (typeof replyTo != 'string') {
|
||||||
return rej('reply_to_id is must be a string');
|
return rej('reply_to_id must be a string');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate id
|
// Validate id
|
||||||
|
|
Loading…
Reference in New Issue