import { Injectable } from '@nestjs/common' ; import { JwtService } from '@nestjs/jwt' ; import { InjectRepository } from '@nestjs/typeorm' ; import { Repository } from 'typeorm' ; import { AccountDto } from '../../dtos/account.dto' ; import { UserEntity } from '../../entities/user.entity' ; import { Token } from '../../interfaces/auth.interface' ; import { AuthService } from '../auth/auth.service' ; @ Injectable ( ) export class AccountService { constructor ( private readonly jwtService , private readonly authService , @ InjectRepository ( UserEntity ) private readonly userRepository ) { } async signIn ( authDto ) { return this . authService . createToken ( authDto . email ) ; } async signUp ( authDto ) { await this . userRepository . save ( authDto ) ; } }