feat(billing): cap each owner's stored file volume
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
import { CurrentUser } from '../auth/current-user.decorator';
|
||||
import {
|
||||
ApplyBillingPlanDto,
|
||||
SetStorageQuotaDto,
|
||||
CreatePlatformAdminDto,
|
||||
CreatePlatformOrganizationDto,
|
||||
ResetPlatformAdminPasswordDto,
|
||||
@@ -122,6 +123,16 @@ export class PlatformController {
|
||||
return this.platform.applyBillingPlan(id, dto);
|
||||
}
|
||||
|
||||
@Get('users/:id/storage')
|
||||
storageUsage(@Param('id') id: string, @Query('refresh') refresh?: string) {
|
||||
return this.platform.storageUsage(id, refresh === '1' || refresh === 'true');
|
||||
}
|
||||
|
||||
@Patch('users/:id/billing/storage')
|
||||
setStorageQuota(@Param('id') id: string, @Body() dto: SetStorageQuotaDto) {
|
||||
return this.platform.setStorageQuota(id, dto.quotaGb);
|
||||
}
|
||||
|
||||
@Patch('organizations/:id/modules')
|
||||
updateOrganizationModules(
|
||||
@Param('id') id: string,
|
||||
|
||||
Reference in New Issue
Block a user