1
0
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:
xiangxiang
2017-07-19 17:14:28 +08:00
parent 462a9a97f3
commit 9ed0760ae9
7 changed files with 15 additions and 15 deletions

View File

@@ -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;
}