mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
refactor(nestjs): wip
This commit is contained in:
@@ -57,7 +57,7 @@ export class WarehousesController {
|
||||
return this.warehousesApplication.activateWarehouses();
|
||||
}
|
||||
|
||||
@Post(':id/mark-primary')
|
||||
@Put(':id/mark-primary')
|
||||
@ApiOperation({ summary: 'Mark a warehouse as primary' })
|
||||
markWarehousePrimary(@Param('id') warehouseId: string) {
|
||||
return this.warehousesApplication.markWarehousePrimary(Number(warehouseId));
|
||||
|
||||
@@ -17,6 +17,8 @@ export class WarehousesSettings {
|
||||
const settings = await this.settingsStore();
|
||||
|
||||
settings.set({ group: 'features', key: Features.WAREHOUSES, value: 1 });
|
||||
|
||||
await settings.save();
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { CreateWarehouse } from './CreateWarehouse.service';
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { I18nContext } from 'nestjs-i18n';
|
||||
import { I18nService } from 'nestjs-i18n';
|
||||
|
||||
@Injectable()
|
||||
export class CreateInitialWarehouse {
|
||||
/**
|
||||
* @param {CreateWarehouse} createWarehouse - Create warehouse service.
|
||||
* @param {I18nContext} i18n - I18n context.
|
||||
* @param {I18nService} i18n - I18n service.
|
||||
*/
|
||||
constructor(
|
||||
private readonly createWarehouse: CreateWarehouse,
|
||||
private readonly i18n: I18nContext,
|
||||
private readonly i18n: I18nService,
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { IsOptional } from "@/common/decorators/Validators";
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { IsBoolean, IsEmail, IsOptional, IsUrl } from "class-validator";
|
||||
import { IsBoolean, IsEmail, IsUrl } from "class-validator";
|
||||
import { IsNotEmpty } from "class-validator";
|
||||
import { IsString } from "class-validator";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user