@lenne.tech/nest-server 9.0.6 → 9.0.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lenne.tech/nest-server",
3
- "version": "9.0.6",
3
+ "version": "9.0.7",
4
4
  "description": "Modern, fast, powerful Node.js web framework in TypeScript based on Nest with a GraphQL API and a connection to MongoDB (or other databases).",
5
5
  "keywords": [
6
6
  "node",
@@ -1,6 +1,7 @@
1
1
  import { Injectable } from '@nestjs/common';
2
2
  import { ConfigService } from './config.service';
3
- import Mailjet from 'node-mailjet';
3
+ // eslint-disable-next-line
4
+ const Mailjet = require('node-mailjet');
4
5
 
5
6
  /**
6
7
  * Mailjet service
@@ -156,11 +156,17 @@ export abstract class CoreUserService<
156
156
  if (!dbObject) {
157
157
  throw new NotFoundException(`No user found with email: ${email}`);
158
158
  }
159
+
159
160
  return this.process(
160
161
  async () => {
161
162
  // Set reset token and return
162
163
  dbObject.passwordResetToken = crypto.randomBytes(32).toString('hex');
163
- return await dbObject.save();
164
+
165
+ // Save
166
+ await dbObject.save();
167
+
168
+ // Return new user
169
+ return dbObject;
164
170
  },
165
171
  { dbObject, serviceOptions }
166
172
  );