且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Mongoose .save() 返回空的错误对象,不保存在数据库中

更新时间:2023-02-15 13:08:45

问题在于初始数据库连接,密码包含未编码的字符.编码特殊字符的一种解决方案是使用内置的 encodeURIComponent() 函数.

The issue was with the initial database connection, the password contained characters that that weren't being encoded. One solution to encode special characters is to make use of the built-in encodeURIComponent() function.