mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: rename language key for incorrect parameter type error
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"invalid-data": "Invalid Data",
|
"invalid-data": "Invalid Data",
|
||||||
"invalid-json": "Invalid JSON",
|
"invalid-json": "Invalid JSON",
|
||||||
"array-expected": "A value of type Array was expected for property `%1`, but %2 was received instead",
|
"wrong-parameter-type": "A value of type %3 was expected for property `%1`, but %2 was received instead",
|
||||||
"required-parameters-missing": "Required parameters were missing from this API call: %1",
|
"required-parameters-missing": "Required parameters were missing from this API call: %1",
|
||||||
|
|
||||||
"not-logged-in": "You don't seem to be logged in.",
|
"not-logged-in": "You don't seem to be logged in.",
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ chatsAPI.create = async function (caller, data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!data.uids || !Array.isArray(data.uids)) {
|
if (!data.uids || !Array.isArray(data.uids)) {
|
||||||
throw new Error(`[[error:array-expected, uids, ${typeof data.uids}]]`);
|
throw new Error(`[[error:wrong-parameter-type, uids, ${typeof data.uids}, Array]]`);
|
||||||
}
|
}
|
||||||
|
|
||||||
await Promise.all(data.uids.map(async uid => messaging.canMessageUser(caller.uid, uid)));
|
await Promise.all(data.uids.map(async uid => messaging.canMessageUser(caller.uid, uid)));
|
||||||
|
|||||||
Reference in New Issue
Block a user