initial: standalone repo from monorepo split

This commit is contained in:
kevin-asprec
2026-04-13 09:36:55 +08:00
commit 4a8f1e9318
157 changed files with 9198 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import { Controller, Get, Patch, Body, UseGuards } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import { BillingService } from './billing.service';
import { UpdateBillingSettingsDto } from './dto/update-billing-settings.dto';
import { Roles } from '../common/decorators/roles.decorator';
import { RolesGuard } from '../common/guards/roles.guard';
import { TenantGuard } from '../common/guards/tenant.guard';
import { CurrentUser, CurrentUserPayload } from '../common/decorators/current-user.decorator';
@Controller('billing-settings')
@UseGuards(AuthGuard('jwt'), TenantGuard, RolesGuard)
@Roles('tenant_admin')
export class BillingController {
constructor(private readonly billingService: BillingService) {}
@Get()
async getSettings(@CurrentUser() user: CurrentUserPayload) {
return this.billingService.getSettings(user.tenantId);
}
@Patch()
async updateSettings(@CurrentUser() user: CurrentUserPayload, @Body() dto: UpdateBillingSettingsDto) {
return this.billingService.updateSettings(user.tenantId, dto);
}
}