Assist_Design/apps/bff/src/modules/currency/currency.controller.ts
barsa 3d17f36c2f Refactor audit and signup workflows to streamline user data handling
- Removed unnecessary fields (firstName, lastName, company, phone) from user creation in AuditService and SignupWorkflowService for cleaner data management.
- Enhanced error logging in GlobalAuthGuard to differentiate between unauthorized access attempts and other authentication errors.
- Updated CurrencyController to mark endpoints as public for improved access control.
- Improved button components across various steps in the internet and SIM configuration processes for better user experience and consistency.
- Added active internet subscription warning in checkout process to prevent duplicate subscriptions.
2025-10-22 14:19:31 +09:00

28 lines
792 B
TypeScript

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();
}
}