fix(module): small fixes to module customers
This commit is contained in:
parent
814b25742b
commit
affed3ce56
|
|
@ -1,8 +1,8 @@
|
|||
import { Body, Controller, Delete, Get, Param, ParseIntPipe, Patch, Post } from '@nestjs/common';
|
||||
import { CustomersService } from '../services/customers.service';
|
||||
import { Customers, Employees } from '@prisma/client';
|
||||
import { CreateCustomerDto } from '../dtos/create-customer';
|
||||
import { UpdateCustomerDto } from '../dtos/update-customer';
|
||||
import { Customers } from '@prisma/client';
|
||||
import { CreateCustomerDto } from '../dtos/create-customer.dto';
|
||||
import { UpdateCustomerDto } from '../dtos/update-customer.dto';
|
||||
import { RolesAllowed } from "src/common/decorators/roles.decorators";
|
||||
import { Roles as RoleEnum } from '.prisma/client';
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export class CreateCustomerDto {
|
|||
|
||||
@IsEmail()
|
||||
@IsOptional()
|
||||
email?: string;
|
||||
email: string;
|
||||
|
||||
@Type(() => Number)
|
||||
@IsInt()
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { PartialType } from "@nestjs/swagger";
|
||||
import { CreateCustomerDto } from "./create-customer";
|
||||
import { CreateCustomerDto } from "./create-customer.dto";
|
||||
|
||||
export class UpdateCustomerDto extends PartialType(CreateCustomerDto) {}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import { Injectable, NotFoundException } from '@nestjs/common';
|
||||
import { PrismaService } from 'src/prisma/prisma.service';
|
||||
import { CreateCustomerDto } from '../dtos/create-customer';
|
||||
import { CreateCustomerDto } from '../dtos/create-customer.dto';
|
||||
import { Customers, Users } from '@prisma/client';
|
||||
import { UpdateCustomerDto } from '../dtos/update-customer';
|
||||
import { UpdateCustomerDto } from '../dtos/update-customer.dto';
|
||||
|
||||
@Injectable()
|
||||
export class CustomersService {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user