18 lines
446 B
TypeScript
18 lines
446 B
TypeScript
import { Injectable } from '@nestjs/common'
|
|
import { InjectRepository } from '@nestjs/typeorm'
|
|
import { Repository } from 'typeorm'
|
|
import { UserEntity } from '../../entity/user.entity'
|
|
|
|
@Injectable()
|
|
export class UserDeleteService {
|
|
constructor(
|
|
@InjectRepository(UserEntity)
|
|
private readonly userRepository: Repository<UserEntity>,
|
|
) {
|
|
}
|
|
|
|
async delete(id: number): Promise<void> {
|
|
await this.userRepository.delete(id)
|
|
}
|
|
}
|