File

src/provider/edc_api/edc.services.ts

Index

Methods

Constructor

constructor(httpService: HttpService)
Parameters :
Name Type Optional
httpService HttpService No

Methods

Async getCanalDistribuidor
getCanalDistribuidor(supplierId: number, authorization: string)
Parameters :
Name Type Optional
supplierId number No
authorization string No
Returns : unknown
import { Injectable, Logger } from '@nestjs/common';
import { HttpService } from '@nestjs/axios';
@Injectable()
export class EdcService {
  constructor(private readonly httpService: HttpService) { }
  
  async getCanalDistribuidor(supplierId: number, authorization: string) {
    const response = await this.httpService.axiosRef.get(`${process.env.EDC_API_URL}/fornecedor-canal/find/${supplierId}`,{
      headers:{authorization}
    })
    return response.data;
  }
}

results matching ""

    No results matching ""