mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
refactor(nestjs): wip
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -17,6 +17,8 @@ export class BranchesSettingsService {
|
||||
const settingsStore = await this.settingsStore();
|
||||
|
||||
settingsStore.set({ group: 'features', key: Features.BRANCHES, value: 1 });
|
||||
|
||||
await settingsStore.save();
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user