when i'm trying to build CRUD using nest.js with postgres sql using TypeOrm this error appears to me which prevent me from making a new row in database and crash my nest.js application and told me "no overload matches this call"
async createUser(createUserDto: CreateUserDto): Promise<User> {
const newUser = this.userRepository.create(createUserDto);
return await this.userRepository.save(newUser);
}
I'm trying to make it
.save({...createUserDto})
and make is as This
.save([...createUserDto])
but this tries doesn't work