mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2025-12-25 05:09:25 +00:00
refactor imports/exports
This commit is contained in:
@@ -13,11 +13,9 @@ import {
|
||||
UseGuards,
|
||||
} from '@nestjs/common'
|
||||
import { RegistrationDto } from './dto/registration.dto'
|
||||
import { LocalAuthGuard } from './guards/local-auth.guard'
|
||||
import { JwtAuthGuard } from './guards/jwt-auth.guard'
|
||||
import { LocalAuthGuard, JwtAuthGuard, JwtRefreshGuard } from './guards'
|
||||
import { Response as ExpressResponse } from 'express'
|
||||
import { JwtRefreshGuard } from './guards/jwt-refresh.guard'
|
||||
import { Cookies } from '../../infrastructure/decorators/cookie.decorator'
|
||||
import { Cookies } from '../../infrastructure/decorators'
|
||||
import { CommandBus } from '@nestjs/cqrs'
|
||||
import {
|
||||
CreateUserCommand,
|
||||
|
||||
4
src/modules/auth/guards/index.ts
Normal file
4
src/modules/auth/guards/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export * from './base-auth.guard'
|
||||
export * from './jwt-auth.guard'
|
||||
export * from './jwt-refresh.guard'
|
||||
export * from './local-auth.guard'
|
||||
@@ -5,8 +5,8 @@ import { PrismaService } from '../../../prisma.service'
|
||||
export class AuthRepository {
|
||||
constructor(private prisma: PrismaService) {}
|
||||
|
||||
async createRefreshToken(userId: string, token: string, expiresAt: Date) {
|
||||
return await this.prisma.refreshToken.create({
|
||||
createRefreshToken(userId: string, token: string, expiresAt: Date) {
|
||||
return this.prisma.refreshToken.create({
|
||||
data: {
|
||||
userId,
|
||||
token,
|
||||
|
||||
@@ -2,7 +2,7 @@ export * from './create-user-use-case'
|
||||
export * from './get-current-user-data-use-case'
|
||||
export * from './logout-use-case'
|
||||
export * from './resend-verification-email-use-case'
|
||||
export * from './refresh-token-use-case'
|
||||
export * from './verify-email-use-case'
|
||||
export * from './send-password-recovery-email-use-case'
|
||||
export * from './reset-password-use-case'
|
||||
export * from './refresh-token-use-case'
|
||||
export * from './send-password-recovery-email-use-case'
|
||||
export * from './verify-email-use-case'
|
||||
|
||||
Reference in New Issue
Block a user