13 lines
380 B
TypeScript
13 lines
380 B
TypeScript
import { Controller, Get, Query } from '@nestjs/common';
|
|
import { PricingService } from './pricing.service';
|
|
|
|
@Controller('pricing')
|
|
export class PricingController {
|
|
constructor(private readonly pricing: PricingService) {}
|
|
|
|
@Get('latest')
|
|
getLatest(@Query('karatPerMille') karatPerMille: string) {
|
|
return this.pricing.getLatestQuote(Number(karatPerMille) || 750);
|
|
}
|
|
}
|