add safety guard to serializers & fix importing uncorrect serializer
This commit is contained in:
@@ -57,6 +57,8 @@ const self = async (
|
||||
_post = deepcopy(post);
|
||||
}
|
||||
|
||||
if (!_post) throw 'invalid post arg.';
|
||||
|
||||
const id = _post._id;
|
||||
|
||||
// Rename _id to id
|
||||
|
@@ -56,6 +56,8 @@ export default (
|
||||
_user = deepcopy(user);
|
||||
}
|
||||
|
||||
if (!_user) return reject('invalid user arg.');
|
||||
|
||||
// Me
|
||||
const meId: mongo.ObjectID = me
|
||||
? mongo.ObjectID.prototype.isPrototypeOf(me)
|
||||
|
Reference in New Issue
Block a user