mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
refactor: nestjs
This commit is contained in:
@@ -17,9 +17,11 @@ import {
|
||||
import { GetCurrentOrganizationService } from './queries/GetCurrentOrganization.service';
|
||||
import { UpdateOrganizationService } from './commands/UpdateOrganization.service';
|
||||
import { ApiTags, ApiOperation, ApiResponse, ApiBody } from '@nestjs/swagger';
|
||||
import { PublicRoute } from '../Auth/Jwt.guard';
|
||||
|
||||
@ApiTags('Organization')
|
||||
@Controller('organization')
|
||||
@PublicRoute()
|
||||
export class OrganizationController {
|
||||
constructor(
|
||||
private readonly buildOrganizationService: BuildOrganizationService,
|
||||
@@ -80,6 +82,7 @@ export class OrganizationController {
|
||||
await this.updateOrganizationService.execute(updateDTO);
|
||||
|
||||
return res.status(200).send({
|
||||
code: 200,
|
||||
message: 'Organization information has been updated successfully.',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -22,10 +22,11 @@ import {
|
||||
ApiParam,
|
||||
ApiBody,
|
||||
} from '@nestjs/swagger';
|
||||
import { PublicRoute } from '../Auth/Jwt.guard';
|
||||
|
||||
@ApiTags('Roles')
|
||||
@Controller('roles')
|
||||
@Injectable()
|
||||
@PublicRoute()
|
||||
export class RolesController {
|
||||
constructor(private readonly rolesApp: RolesApplication) {}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export class Role extends TenantBaseModel {
|
||||
* Relationship mapping.
|
||||
*/
|
||||
static get relationMappings() {
|
||||
const { RolePermission } = require('./RolePermission');
|
||||
const { RolePermission } = require('./RolePermission.model');
|
||||
|
||||
return {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user