I need to get the data from the database and just pass the interface data to the response, but what the interface should omit continues to appear
type ITeste = Omit<Entity.Entity, 'billing_country_id'>;
@injectable()
export default class Find {
constructor(
@inject('DocumentHeaderRepository')
private documentHeaderRepository: Entity.IRepository,
) {}
public async execute(data: Entity.IFindRequest): Promise<ITeste[]> {
const result = await this.documentHeaderRepository.find(data);
return result;
}
}
// what i'm getting...
"response":[
{
"billing_country_id": "d3d2f794-9271-4205-80c8-5ea273d85f57",
"billing_country_name": "Portugal",
"billing_locality": "Pontes",
billing_postal_code": "2910-137"}
]
// what i need
"response":[
{
"billing_country_name": "Portugal",
"billing_locality": "Pontes",
"billing_postal_code": "2910-137"}
]