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