query nestjs
import { Controller, Get, Query } from '@nestjs/common';
@Controller('api/report')
export class ReportController {
@Get('earnings')
async earning(@Query() query: any) {
return query;
}
}
/**
Postman url: http://localhost:3008/api/report/earnings?opt=2&clt=&vhl=&mto=&from=26/07/2018&end=13/09/2021
**/
//Result
const resonseRequest = {
"opt": "2",
"clt": "",
"vhl": "",
"mto": "",
"from": "26/07/2018",
"end": "13/09/2021"
}