diff --git a/src/auth/auth.resolver.ts b/src/auth/auth.resolver.ts index b2583632..9bfe897d 100644 --- a/src/auth/auth.resolver.ts +++ b/src/auth/auth.resolver.ts @@ -31,7 +31,7 @@ export class AuthResolver { async login(@Args('data') { email, password }: LoginInput) { const { accessToken, refreshToken } = await this.auth.login( email.toLowerCase(), - password + password, ); return { diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.ts index 59e1cdc6..963ffcf9 100644 --- a/src/auth/auth.service.ts +++ b/src/auth/auth.service.ts @@ -20,12 +20,12 @@ export class AuthService { private readonly jwtService: JwtService, private readonly prisma: PrismaService, private readonly passwordService: PasswordService, - private readonly configService: ConfigService + private readonly configService: ConfigService, ) {} async createUser(payload: SignupInput): Promise { const hashedPassword = await this.passwordService.hashPassword( - payload.password + payload.password, ); try { @@ -60,7 +60,7 @@ export class AuthService { const passwordValid = await this.passwordService.validatePassword( password, - user.password + user.password, ); if (!passwordValid) { diff --git a/src/auth/jwt.strategy.ts b/src/auth/jwt.strategy.ts index 4d5933fa..b48d1289 100644 --- a/src/auth/jwt.strategy.ts +++ b/src/auth/jwt.strategy.ts @@ -10,7 +10,7 @@ import { JwtDto } from './dto/jwt.dto'; export class JwtStrategy extends PassportStrategy(Strategy) { constructor( private readonly authService: AuthService, - readonly configService: ConfigService + readonly configService: ConfigService, ) { super({ jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(), diff --git a/src/common/decorators/user.decorator.ts b/src/common/decorators/user.decorator.ts index 13a97ce8..8d614315 100644 --- a/src/common/decorators/user.decorator.ts +++ b/src/common/decorators/user.decorator.ts @@ -3,5 +3,5 @@ import { GqlExecutionContext } from '@nestjs/graphql'; export const UserEntity = createParamDecorator( (data: unknown, ctx: ExecutionContext) => - GqlExecutionContext.create(ctx).getContext().req.user + GqlExecutionContext.create(ctx).getContext().req.user, ); diff --git a/src/posts/posts.resolver.ts b/src/posts/posts.resolver.ts index 80315a76..f70d4618 100644 --- a/src/posts/posts.resolver.ts +++ b/src/posts/posts.resolver.ts @@ -37,7 +37,7 @@ export class PostsResolver { @Mutation(() => Post) async createPost( @UserEntity() user: User, - @Args('data') data: CreatePostInput + @Args('data') data: CreatePostInput, ) { const newPost = this.prisma.post.create({ data: { @@ -61,7 +61,7 @@ export class PostsResolver { type: () => PostOrder, nullable: true, }) - orderBy: PostOrder + orderBy: PostOrder, ) { const a = await findManyCursorConnection( (args) => @@ -81,7 +81,7 @@ export class PostsResolver { title: { contains: query || '' }, }, }), - { first, last, before, after } + { first, last, before, after }, ); return a; } diff --git a/src/users/users.resolver.ts b/src/users/users.resolver.ts index 91ef5c48..4dbe474b 100644 --- a/src/users/users.resolver.ts +++ b/src/users/users.resolver.ts @@ -20,7 +20,7 @@ import { UpdateUserInput } from './dto/update-user.input'; export class UsersResolver { constructor( private usersService: UsersService, - private prisma: PrismaService + private prisma: PrismaService, ) {} @Query(() => User) @@ -32,7 +32,7 @@ export class UsersResolver { @Mutation(() => User) async updateUser( @UserEntity() user: User, - @Args('data') newUserData: UpdateUserInput + @Args('data') newUserData: UpdateUserInput, ) { return this.usersService.updateUser(user.id, newUserData); } @@ -41,12 +41,12 @@ export class UsersResolver { @Mutation(() => User) async changePassword( @UserEntity() user: User, - @Args('data') changePassword: ChangePasswordInput + @Args('data') changePassword: ChangePasswordInput, ) { return this.usersService.changePassword( user.id, user.password, - changePassword + changePassword, ); } diff --git a/src/users/users.service.ts b/src/users/users.service.ts index cf8b8975..d54c80cd 100644 --- a/src/users/users.service.ts +++ b/src/users/users.service.ts @@ -8,7 +8,7 @@ import { UpdateUserInput } from './dto/update-user.input'; export class UsersService { constructor( private prisma: PrismaService, - private passwordService: PasswordService + private passwordService: PasswordService, ) {} updateUser(userId: string, newUserData: UpdateUserInput) { @@ -23,11 +23,11 @@ export class UsersService { async changePassword( userId: string, userPassword: string, - changePassword: ChangePasswordInput + changePassword: ChangePasswordInput, ) { const passwordValid = await this.passwordService.validatePassword( changePassword.oldPassword, - userPassword + userPassword, ); if (!passwordValid) { @@ -35,7 +35,7 @@ export class UsersService { } const hashedPassword = await this.passwordService.hashPassword( - changePassword.newPassword + changePassword.newPassword, ); return this.prisma.user.update({