File tree Expand file tree Collapse file tree 3 files changed +23
-5
lines changed
src/components/authentication Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 6
6
ResolveField ,
7
7
Resolver ,
8
8
} from '@nestjs/graphql' ;
9
+ import { stripIndent } from 'common-tags' ;
9
10
import { AnonSession , GqlContextType , Session } from '../../common' ;
10
11
import { Loader , LoaderOf } from '../../core' ;
11
12
import { Powers as Power , Privileges } from '../authorization' ;
@@ -21,7 +22,10 @@ export class LoginResolver {
21
22
) { }
22
23
23
24
@Mutation ( ( ) => LoginOutput , {
24
- description : 'Login a user' ,
25
+ description : stripIndent `
26
+ Login a user
27
+ @sensitive-secrets
28
+ ` ,
25
29
} )
26
30
async login (
27
31
@Args ( 'input' ) input : LoginInput ,
@@ -34,7 +38,10 @@ export class LoginResolver {
34
38
}
35
39
36
40
@Mutation ( ( ) => LogoutOutput , {
37
- description : 'Logout a user' ,
41
+ description : stripIndent `
42
+ Logout a user
43
+ @sensitive-secrets
44
+ ` ,
38
45
} )
39
46
async logout (
40
47
@AnonSession ( ) session : Session ,
Original file line number Diff line number Diff line change 1
1
import { Args , Mutation , Resolver } from '@nestjs/graphql' ;
2
+ import { stripIndent } from 'common-tags' ;
2
3
import { AnonSession , LoggedInSession , Session } from '../../common' ;
3
4
import { AuthenticationService } from './authentication.service' ;
4
5
import {
@@ -15,7 +16,10 @@ export class PasswordResolver {
15
16
constructor ( private readonly authentication : AuthenticationService ) { }
16
17
17
18
@Mutation ( ( ) => ChangePasswordOutput , {
18
- description : 'Change your password' ,
19
+ description : stripIndent `
20
+ Change your password
21
+ @sensitive-secrets
22
+ ` ,
19
23
} )
20
24
async changePassword (
21
25
@Args ( ) { oldPassword, newPassword } : ChangePasswordArgs ,
@@ -36,7 +40,10 @@ export class PasswordResolver {
36
40
}
37
41
38
42
@Mutation ( ( ) => ResetPasswordOutput , {
39
- description : 'Reset Password' ,
43
+ description : stripIndent `
44
+ Reset Password
45
+ @sensitive-secrets
46
+ ` ,
40
47
} )
41
48
async resetPassword (
42
49
@Args ( 'input' ) input : ResetPasswordInput ,
Original file line number Diff line number Diff line change 6
6
ResolveField ,
7
7
Resolver ,
8
8
} from '@nestjs/graphql' ;
9
+ import { stripIndent } from 'common-tags' ;
9
10
import { AnonSession , GqlContextType , Session } from '../../common' ;
10
11
import { Loader , LoaderOf } from '../../core' ;
11
12
import { Powers as Power , Privileges } from '../authorization' ;
@@ -21,7 +22,10 @@ export class RegisterResolver {
21
22
) { }
22
23
23
24
@Mutation ( ( ) => RegisterOutput , {
24
- description : 'Register a new user' ,
25
+ description : stripIndent `
26
+ Register a new user
27
+ @sensitive-secrets
28
+ ` ,
25
29
} )
26
30
async register (
27
31
@Args ( 'input' ) input : RegisterInput ,
You can’t perform that action at this time.
0 commit comments