16 lines
530 B
TypeScript
16 lines
530 B
TypeScript
|
|
import { TokenAccount } from '@/common/decorators/tokenInfo.decorator'
|
||
|
|
import { Controller, Get } from '@nestjs/common'
|
||
|
|
import { ApiTags } from '@nestjs/swagger'
|
||
|
|
import { SaleInvoicesService } from './saleInvoices.service'
|
||
|
|
|
||
|
|
@ApiTags('ConsumerStatistics')
|
||
|
|
@Controller('consumer/statistics')
|
||
|
|
export class StatisticsController {
|
||
|
|
constructor(private readonly service: SaleInvoicesService) {}
|
||
|
|
|
||
|
|
@Get('invoices')
|
||
|
|
async getInvoices(@TokenAccount('userId') consumerId: string) {
|
||
|
|
return this.service.getInvoices(consumerId)
|
||
|
|
}
|
||
|
|
}
|