PrismaP
Prisma15mo ago
4 replies
myatminaung

Omit type for creating

However, I can use delete user.password. Is there a way to omit the password when creating a new user?
async create(dto: CreateUserDto) {
    const user = await this.prismaService.instance.user.create({
      data: {
        ...dto,
      },
    });

    return user;
  }
Was this page helpful?