- Update debugBuilder to inspect objects instead of stringify - Moved tthe debug entry for saving post to after the post is validated
This commit is contained in:
@@ -480,11 +480,11 @@ exports.PostStorage = class PostStorage extends Storage {
|
||||
}
|
||||
|
||||
savePost(_postObject, callback){
|
||||
const tempCreationDate = returnMysqlTime();
|
||||
log.DEBUG("Saving Post Object:", _postObject);
|
||||
const tempCreationDate = returnMysqlTime();
|
||||
if (!_postObject?.postId || !_postObject?.link) {
|
||||
return callback(new Error("Post object malformed, check the object before saving it", _postObject), undefined)
|
||||
}
|
||||
log.DEBUG("Saving Post:", _postObject);
|
||||
|
||||
if (_postObject.link.length > 250) _postObject.link = _postObject.link.substring(0, 250);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user