|
@@ -1,10 +1,10 @@
|
|
|
import { Query, ResolveProperty, Resolver } from '@nestjs/graphql';
|
|
import { Query, ResolveProperty, Resolver } from '@nestjs/graphql';
|
|
|
-import { AuthGuard } from '@nestjs/passport';
|
|
|
|
|
import { CustomerService } from './customer.service';
|
|
import { CustomerService } from './customer.service';
|
|
|
import { Address } from '../../entity/address/address.interface';
|
|
import { Address } from '../../entity/address/address.interface';
|
|
|
import { CustomerEntity } from "../../entity/customer/customer.entity";
|
|
import { CustomerEntity } from "../../entity/customer/customer.entity";
|
|
|
import { Customer } from "../../entity/customer/customer.interface";
|
|
import { Customer } from "../../entity/customer/customer.interface";
|
|
|
-import { UseGuards } from "@nestjs/common";
|
|
|
|
|
|
|
+import { RolesGuard } from "../../auth/roles-guard";
|
|
|
|
|
+import { Role } from "../../auth/role";
|
|
|
|
|
|
|
|
@Resolver('Customer')
|
|
@Resolver('Customer')
|
|
|
export class CustomerResolver {
|
|
export class CustomerResolver {
|
|
@@ -15,7 +15,6 @@ export class CustomerResolver {
|
|
|
return this.customerService.findAll();
|
|
return this.customerService.findAll();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @UseGuards(AuthGuard('jwt'))
|
|
|
|
|
@Query('customer')
|
|
@Query('customer')
|
|
|
customer(obj, args): Promise<Customer> {
|
|
customer(obj, args): Promise<Customer> {
|
|
|
return this.customerService.findOne(args.id);
|
|
return this.customerService.findOne(args.id);
|