mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-02 08:48:06 +09:00
[API] Fix bug
This commit is contained in:
parent
37c21dc821
commit
8097083ed6
@ -31,6 +31,10 @@ module.exports = (params, user) =>
|
||||
// Get 'user_id' parameter
|
||||
let recipient = params.user_id;
|
||||
if (recipient !== undefined && recipient !== null) {
|
||||
if (typeof recipient != 'string') {
|
||||
return rej('user_id must be a string');
|
||||
}
|
||||
|
||||
// Validate id
|
||||
if (!mongo.ObjectID.isValid(recipient)) {
|
||||
return rej('incorrect user_id');
|
||||
|
Loading…
Reference in New Issue
Block a user