Assist_Design/apps/bff/src/modules/currency/currency.controller.ts

22 lines
681 B
TypeScript
Raw Normal View History

import { Controller, Get } from "@nestjs/common";
import { Public } from "@bff/modules/auth/decorators/public.decorator.js";
import { WhmcsCurrencyService } from "../../integrations/whmcs/services/whmcs-currency.service.js";
import type { WhmcsCurrency } from "@customer-portal/domain/billing";
@Controller("currency")
export class CurrencyController {
constructor(private readonly currencyService: WhmcsCurrencyService) {}
@Public()
@Get("default")
getDefaultCurrency(): WhmcsCurrency {
return this.currencyService.getDefaultCurrency();
}
@Public()
@Get("all")
getAllCurrencies(): WhmcsCurrency[] {
return this.currencyService.getAllCurrencies();
}
}