fix
This commit is contained in:
parent
17a23c3eb5
commit
034c7c083a
20 changed files with 29 additions and 29 deletions
|
|
@ -15,11 +15,11 @@ import serialize from '../../serializers/post';
|
|||
*/
|
||||
module.exports = (params, me) => new Promise(async (res, rej) => {
|
||||
// Get 'user_id' parameter
|
||||
const [userId, userIdErr] = it(params.user_id, 'id');
|
||||
const [userId, userIdErr] = it(params.user_id, 'id').get();
|
||||
if (userIdErr) return rej('invalid user_id param');
|
||||
|
||||
// Get 'username' parameter
|
||||
const [username, usernameErr] = it(params.username, 'string');
|
||||
const [username, usernameErr] = it(params.username, 'string').get();
|
||||
if (usernameErr) return rej('invalid username param');
|
||||
|
||||
if (userId === undefined && username === undefined) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue