import { Controller, Get } from "@nestjs/common"; import { Public } from "@bff/modules/auth/decorators/public.decorator"; import { WhmcsCurrencyService } from "../../integrations/whmcs/services/whmcs-currency.service"; @Controller("currency") export class CurrencyController { constructor(private readonly currencyService: WhmcsCurrencyService) {} @Public() @Get("default") getDefaultCurrency() { const defaultCurrency = this.currencyService.getDefaultCurrency(); return { code: defaultCurrency.code, prefix: defaultCurrency.prefix, suffix: defaultCurrency.suffix, format: defaultCurrency.format, rate: defaultCurrency.rate, }; } @Public() @Get("all") getAllCurrencies() { return this.currencyService.getAllCurrencies(); } }