orbitx-core-models 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"user.model.d.ts","sourceRoot":"","sources":["../../src/models/user.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAoCrD,wBAAgB,eAAe,CAC7B,gBAAgB,EAAE,cAAc,UAAU,CAAC,GAC1C,KAAK,CAAC,KAAK,CAAC,CAKd"}
1
+ {"version":3,"file":"user.model.d.ts","sourceRoot":"","sources":["../../src/models/user.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAqCrD,wBAAgB,eAAe,CAC7B,gBAAgB,EAAE,cAAc,UAAU,CAAC,GAC1C,KAAK,CAAC,KAAK,CAAC,CAKd"}
@@ -30,10 +30,10 @@ userSchema.pre("save", async function (next) {
30
30
  });
31
31
  next();
32
32
  });
33
- userSchema.methods.compare = async function (inputPassword) {
33
+ userSchema.methods.compare = async function (userPassword, inputPassword) {
34
34
  if (!this.password)
35
35
  return false;
36
- return await argon2_1.default.verify(this.password, inputPassword);
36
+ return await argon2_1.default.verify(userPassword, inputPassword);
37
37
  };
38
38
  function createUserModel(mongooseInstance) {
39
39
  return (mongooseInstance.models.User ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orbitx-core-models",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Shared Mongoose models and interfaces for OrbitX services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",