mirror of
https://github.com/microsoft/TypeScript-Node-Starter.git
synced 2025-11-09 00:37:27 +00:00
fit error TS2559: Type '4' has no properties in common with type 'MinMaxOptions'.
fix err TypeScript-Node-Starter/src/controllers/api.ts[6, 9]: missing whitespace, 8 files fix bugs of issue 15
This commit is contained in:
@@ -64,8 +64,8 @@ userSchema.pre("save", function save(next) {
|
||||
});
|
||||
});
|
||||
|
||||
userSchema.methods.comparePassword = function(candidatePassword: string, cb: (err: any, isMatch: any) => {}) {
|
||||
bcrypt.compare(candidatePassword, this.password, (err: mongoose.Error , isMatch: boolean) => {
|
||||
userSchema.methods.comparePassword = function (candidatePassword: string, cb: (err: any, isMatch: any) => {}) {
|
||||
bcrypt.compare(candidatePassword, this.password, (err: mongoose.Error, isMatch: boolean) => {
|
||||
cb(err, isMatch);
|
||||
});
|
||||
};
|
||||
@@ -74,7 +74,7 @@ userSchema.methods.comparePassword = function(candidatePassword: string, cb: (er
|
||||
/**
|
||||
* Helper method for getting user's gravatar.
|
||||
*/
|
||||
userSchema.methods.gravatar = function(size: number) {
|
||||
userSchema.methods.gravatar = function (size: number) {
|
||||
if (!size) {
|
||||
size = 200;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user