Skip to content

Commit

Permalink
Merge pull request #376 from lenneTech/develop
Browse files Browse the repository at this point in the history
Release 10.4.2
  • Loading branch information
kaihaase authored Oct 6, 2024
2 parents c920a67 + 7da6f77 commit 1dcd7cd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lenne.tech/nest-server",
"version": "10.4.1",
"version": "10.4.2",
"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).",
"keywords": [
"node",
Expand Down Expand Up @@ -47,7 +47,6 @@
"test:ci": "NODE_ENV=local jest --config jest-e2e.json --ci --forceExit",
"test:watch": "NODE_ENV=local jest --watch",
"prepack": "npm run prestart:prod",
"prepare": "husky install",
"prepublishOnly": "npm run lint && npm run test:ci",
"preversion": "npm run lint",
"watch": "npm-watch"
Expand Down
2 changes: 1 addition & 1 deletion spectaql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ servers:
info:
title: lT Nest Server
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).
version: 10.4.1
version: 10.4.2
contact:
name: lenne.Tech GmbH
url: https://lenne.tech
Expand Down
18 changes: 9 additions & 9 deletions src/server/modules/user/user.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,6 @@ export class UserResolver {
return await this.userService.getVerifiedState(token);
}

/**
* Request new password for user with email
*/
@Roles(RoleEnum.S_EVERYONE)
@Query(() => Boolean, { description: 'Request new password for user with email' })
async requestPasswordResetMail(@Args('email') email: string): Promise<boolean> {
return !!(await this.userService.sendPasswordResetMail(email));
}

// ===========================================================================
// Mutations
// ===========================================================================
Expand Down Expand Up @@ -128,6 +119,15 @@ export class UserResolver {
return !!(await this.userService.resetPassword(token, password));
}

/**
* Request new password for user with email
*/
@Roles(RoleEnum.S_EVERYONE)
@Mutation(() => Boolean, { description: 'Request new password for user with email' })
async requestPasswordResetMail(@Args('email') email: string): Promise<boolean> {
return !!(await this.userService.sendPasswordResetMail(email));
}

/**
* Update existing user
*/
Expand Down
2 changes: 2 additions & 0 deletions tests/server.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ describe('ServerModule (e2e)', () => {
email: `invalid${gEmail}`,
},
name: 'requestPasswordResetMail',
type: TestGraphQLType.MUTATION,
});
expect(res.errors[0].extensions.originalError.statusCode).toEqual(404);
expect(res.errors[0].message).toEqual('No user found with email: ' + `invalid${gEmail}`);
Expand All @@ -216,6 +217,7 @@ describe('ServerModule (e2e)', () => {
email: gEmail,
},
name: 'requestPasswordResetMail',
type: TestGraphQLType.MUTATION,
});
expect(res).toEqual(true);
});
Expand Down

0 comments on commit 1dcd7cd

Please sign in to comment.