refactor(nestjs): wip

This commit is contained in:
Ahmed Bouhuolia
2025-05-27 15:42:27 +02:00
parent 83c9392b74
commit b7a3c42074
33 changed files with 186 additions and 72 deletions

View File

@@ -76,8 +76,13 @@ export class BranchesController {
status: 200,
description: 'The branches feature has been successfully activated.',
})
activateBranches() {
return this.branchesApplication.activateBranches();
async activateBranches() {
await this.branchesApplication.activateBranches();
return {
code: 200,
message: 'The branches activated successfully.',
};
}
@Put(':id/mark-as-primary')

View File

@@ -17,6 +17,8 @@ export class BranchesSettingsService {
const settingsStore = await this.settingsStore();
settingsStore.set({ group: 'features', key: Features.BRANCHES, value: 1 });
await settingsStore.save();
};
/**

View File

@@ -1,9 +1,9 @@
import { IsOptional } from '@/common/decorators/Validators';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import {
IsBoolean,
IsEmail,
IsNotEmpty,
IsOptional,
IsString,
IsUrl,
} from 'class-validator';