Browse Source

refactor: group all service and controller

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5444/head
Pranav C 2 years ago
parent
commit
96bf2492ef
  1. 2
      packages/nocodb-nest/src/app.module.ts
  2. 2
      packages/nocodb-nest/src/controllers/api-docs/api-docs.controller.spec.ts
  3. 2
      packages/nocodb-nest/src/controllers/api-docs/api-docs.controller.ts
  4. 0
      packages/nocodb-nest/src/controllers/api-docs/template/redocHtml.ts
  5. 0
      packages/nocodb-nest/src/controllers/api-docs/template/swaggerHtml.ts
  6. 2
      packages/nocodb-nest/src/controllers/api-tokens.controller.spec.ts
  7. 8
      packages/nocodb-nest/src/controllers/api-tokens.controller.ts
  8. 2
      packages/nocodb-nest/src/controllers/audits.controller.spec.ts
  9. 10
      packages/nocodb-nest/src/controllers/audits.controller.ts
  10. 2
      packages/nocodb-nest/src/controllers/auth.controller.spec.ts
  11. 8
      packages/nocodb-nest/src/controllers/auth.controller.ts
  12. 2
      packages/nocodb-nest/src/controllers/bases.controller.spec.ts
  13. 8
      packages/nocodb-nest/src/controllers/bases.controller.ts
  14. 0
      packages/nocodb-nest/src/controllers/bulk-data-alias.controller.spec.ts
  15. 6
      packages/nocodb-nest/src/controllers/bulk-data-alias.controller.ts
  16. 2
      packages/nocodb-nest/src/controllers/caches.controller.spec.ts
  17. 4
      packages/nocodb-nest/src/controllers/caches.controller.ts
  18. 2
      packages/nocodb-nest/src/controllers/columns.controller.spec.ts
  19. 6
      packages/nocodb-nest/src/controllers/columns.controller.ts
  20. 0
      packages/nocodb-nest/src/controllers/data-alias-export.controller.spec.ts
  21. 10
      packages/nocodb-nest/src/controllers/data-alias-export.controller.ts
  22. 0
      packages/nocodb-nest/src/controllers/data-alias-nested.controller.spec.ts
  23. 6
      packages/nocodb-nest/src/controllers/data-alias-nested.controller.ts
  24. 2
      packages/nocodb-nest/src/controllers/data-alias-nested.service.spec.ts
  25. 2
      packages/nocodb-nest/src/controllers/form-columns.controller.spec.ts
  26. 6
      packages/nocodb-nest/src/controllers/form-columns.controller.ts
  27. 2
      packages/nocodb-nest/src/controllers/forms.controller.spec.ts
  28. 6
      packages/nocodb-nest/src/controllers/forms.controller.ts
  29. 2
      packages/nocodb-nest/src/controllers/galleries.controller.spec.ts
  30. 6
      packages/nocodb-nest/src/controllers/galleries.controller.ts
  31. 2
      packages/nocodb-nest/src/controllers/grid-columns.controller.spec.ts
  32. 6
      packages/nocodb-nest/src/controllers/grid-columns.controller.ts
  33. 2
      packages/nocodb-nest/src/controllers/grids.controller.spec.ts
  34. 6
      packages/nocodb-nest/src/controllers/grids.controller.ts
  35. 2
      packages/nocodb-nest/src/controllers/hook-filters.controller.spec.ts
  36. 2
      packages/nocodb-nest/src/controllers/hook-filters.controller.ts
  37. 2
      packages/nocodb-nest/src/controllers/hooks.controller.spec.ts
  38. 8
      packages/nocodb-nest/src/controllers/hooks.controller.ts
  39. 2
      packages/nocodb-nest/src/controllers/import.controller.spec.ts
  40. 18
      packages/nocodb-nest/src/controllers/import.controller.ts
  41. 2
      packages/nocodb-nest/src/controllers/kanbans.controller.spec.ts
  42. 6
      packages/nocodb-nest/src/controllers/kanbans.controller.ts
  43. 2
      packages/nocodb-nest/src/controllers/maps.controller.spec.ts
  44. 6
      packages/nocodb-nest/src/controllers/maps.controller.ts
  45. 2
      packages/nocodb-nest/src/controllers/meta-diffs.controller.spec.ts
  46. 6
      packages/nocodb-nest/src/controllers/meta-diffs.controller.ts
  47. 2
      packages/nocodb-nest/src/controllers/model-visibilities.controller.spec.ts
  48. 6
      packages/nocodb-nest/src/controllers/model-visibilities.controller.ts
  49. 0
      packages/nocodb-nest/src/controllers/old-datas/old-datas.controller.spec.ts
  50. 4
      packages/nocodb-nest/src/controllers/old-datas/old-datas.controller.ts
  51. 0
      packages/nocodb-nest/src/controllers/old-datas/old-datas.service.spec.ts
  52. 10
      packages/nocodb-nest/src/controllers/old-datas/old-datas.service.ts
  53. 2
      packages/nocodb-nest/src/controllers/org-lcense.controller.spec.ts
  54. 6
      packages/nocodb-nest/src/controllers/org-lcense.controller.ts
  55. 2
      packages/nocodb-nest/src/controllers/org-tokens.controller.spec.ts
  56. 8
      packages/nocodb-nest/src/controllers/org-tokens.controller.ts
  57. 2
      packages/nocodb-nest/src/controllers/org-users.controller.spec.ts
  58. 10
      packages/nocodb-nest/src/controllers/org-users.controller.ts
  59. 2
      packages/nocodb-nest/src/controllers/plugins.controller.spec.ts
  60. 8
      packages/nocodb-nest/src/controllers/plugins.controller.ts
  61. 2
      packages/nocodb-nest/src/controllers/projects.controller.spec.ts
  62. 12
      packages/nocodb-nest/src/controllers/projects.controller.ts
  63. 2
      packages/nocodb-nest/src/controllers/public-datas-export.controller.spec.ts
  64. 14
      packages/nocodb-nest/src/controllers/public-datas-export.controller.ts
  65. 2
      packages/nocodb-nest/src/controllers/public-datas.controller.spec.ts
  66. 4
      packages/nocodb-nest/src/controllers/public-datas.controller.ts
  67. 2
      packages/nocodb-nest/src/controllers/public-metas.controller.spec.ts
  68. 2
      packages/nocodb-nest/src/controllers/public-metas.controller.ts
  69. 2
      packages/nocodb-nest/src/controllers/shared-bases.controller.spec.ts
  70. 6
      packages/nocodb-nest/src/controllers/shared-bases.controller.ts
  71. 2
      packages/nocodb-nest/src/controllers/sorts.controller.spec.ts
  72. 8
      packages/nocodb-nest/src/controllers/sorts.controller.ts
  73. 2
      packages/nocodb-nest/src/controllers/sync.controller.spec.ts
  74. 6
      packages/nocodb-nest/src/controllers/sync.controller.ts
  75. 2
      packages/nocodb-nest/src/controllers/tables.controller.spec.ts
  76. 10
      packages/nocodb-nest/src/controllers/tables.controller.ts
  77. 2
      packages/nocodb-nest/src/controllers/utils.controller.spec.ts
  78. 6
      packages/nocodb-nest/src/controllers/utils.controller.ts
  79. 2
      packages/nocodb-nest/src/controllers/view-columns.controller.spec.ts
  80. 8
      packages/nocodb-nest/src/controllers/view-columns.controller.ts
  81. 2
      packages/nocodb-nest/src/controllers/views.controller.spec.ts
  82. 8
      packages/nocodb-nest/src/controllers/views.controller.ts
  83. 0
      packages/nocodb-nest/src/modules/api-docs.service.spec.ts
  84. 4
      packages/nocodb-nest/src/modules/api-docs.service.ts
  85. 4
      packages/nocodb-nest/src/modules/api-docs/api-docs.module.ts
  86. 4
      packages/nocodb-nest/src/modules/api-tokens/api-tokens.module.ts
  87. 4
      packages/nocodb-nest/src/modules/audits/audits.module.ts
  88. 4
      packages/nocodb-nest/src/modules/auth/auth.module.ts
  89. 4
      packages/nocodb-nest/src/modules/bases/bases.module.ts
  90. 4
      packages/nocodb-nest/src/modules/caches/caches.module.ts
  91. 4
      packages/nocodb-nest/src/modules/columns/columns.module.ts
  92. 2
      packages/nocodb-nest/src/modules/datas/data-alias.controller.spec.ts
  93. 2
      packages/nocodb-nest/src/modules/datas/data-alias.controller.ts
  94. 2
      packages/nocodb-nest/src/modules/datas/datas.controller.spec.ts
  95. 2
      packages/nocodb-nest/src/modules/datas/datas.controller.ts
  96. 16
      packages/nocodb-nest/src/modules/datas/datas.module.ts
  97. 4
      packages/nocodb-nest/src/modules/form-columns/form-columns.module.ts
  98. 4
      packages/nocodb-nest/src/modules/forms/forms.module.ts
  99. 4
      packages/nocodb-nest/src/modules/galleries/galleries.module.ts
  100. 4
      packages/nocodb-nest/src/modules/grid-columns/grid-columns.module.ts
  101. Some files were not shown because too many files have changed in this diff Show More

2
packages/nocodb-nest/src/app.module.ts

@ -7,7 +7,7 @@ import { GlobalExceptionFilter } from './filters/global-exception/global-excepti
import NcPluginMgrv2 from './helpers/NcPluginMgrv2'; import NcPluginMgrv2 from './helpers/NcPluginMgrv2';
import { GlobalMiddleware } from './middlewares/global/global.middleware'; import { GlobalMiddleware } from './middlewares/global/global.middleware';
import { GuiMiddleware } from './middlewares/gui/gui.middleware'; import { GuiMiddleware } from './middlewares/gui/gui.middleware';
import { AuthService } from './modules/auth/auth.service'; import { AuthService } from './services/auth.service';
import { UsersModule } from './modules/users/users.module'; import { UsersModule } from './modules/users/users.module';
import { MetaService } from './meta/meta.service'; import { MetaService } from './meta/meta.service';
import { UtilsModule } from './modules/utils/utils.module'; import { UtilsModule } from './modules/utils/utils.module';

2
packages/nocodb-nest/src/modules/api-docs/api-docs.controller.spec.ts → packages/nocodb-nest/src/controllers/api-docs/api-docs.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ApiDocsController } from './api-docs.controller'; import { ApiDocsController } from './api-docs.controller';
import { ApiDocsService } from './api-docs.service'; import { ApiDocsService } from '../../modules/api-docs.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ApiDocsController', () => { describe('ApiDocsController', () => {

2
packages/nocodb-nest/src/modules/api-docs/api-docs.controller.ts → packages/nocodb-nest/src/controllers/api-docs/api-docs.controller.ts

@ -11,7 +11,7 @@ import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { ApiDocsService } from './api-docs.service'; import { ApiDocsService } from '../../modules/api-docs.service';
import getSwaggerHtml from './template/swaggerHtml'; import getSwaggerHtml from './template/swaggerHtml';
import getRedocHtml from './template/redocHtml'; import getRedocHtml from './template/redocHtml';

0
packages/nocodb-nest/src/modules/api-docs/template/redocHtml.ts → packages/nocodb-nest/src/controllers/api-docs/template/redocHtml.ts vendored

0
packages/nocodb-nest/src/modules/api-docs/template/swaggerHtml.ts → packages/nocodb-nest/src/controllers/api-docs/template/swaggerHtml.ts vendored

2
packages/nocodb-nest/src/modules/api-tokens/api-tokens.controller.spec.ts → packages/nocodb-nest/src/controllers/api-tokens.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ApiTokensController } from './api-tokens.controller'; import { ApiTokensController } from './api-tokens.controller';
import { ApiTokensService } from './api-tokens.service'; import { ApiTokensService } from '../services/api-tokens.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ApiTokensController', () => { describe('ApiTokensController', () => {

8
packages/nocodb-nest/src/modules/api-tokens/api-tokens.controller.ts → packages/nocodb-nest/src/controllers/api-tokens.controller.ts

@ -10,13 +10,13 @@ import {
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse'; import { PagedResponseImpl } from '../helpers/PagedResponse';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { ApiTokensService } from './api-tokens.service'; import { ApiTokensService } from '../services/api-tokens.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/audits/audits.controller.spec.ts → packages/nocodb-nest/src/controllers/audits.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { AuditsController } from './audits.controller'; import { AuditsController } from './audits.controller';
import { AuditsService } from './audits.service'; import { AuditsService } from '../services/audits.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('AuditsController', () => { describe('AuditsController', () => {

10
packages/nocodb-nest/src/modules/audits/audits.controller.ts → packages/nocodb-nest/src/controllers/audits.controller.ts

@ -11,14 +11,14 @@ import {
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse'; import { PagedResponseImpl } from '../helpers/PagedResponse';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { Audit } from '../../models'; import { Audit } from '../models';
import { AuditsService } from './audits.service'; import { AuditsService } from '../services/audits.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/auth/auth.controller.spec.ts → packages/nocodb-nest/src/controllers/auth.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { AuthController } from './auth.controller'; import { AuthController } from './auth.controller';
import { AuthService } from './auth.service'; import { AuthService } from '../services/auth.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('AuthController', () => { describe('AuthController', () => {

8
packages/nocodb-nest/src/modules/auth/auth.controller.ts → packages/nocodb-nest/src/controllers/auth.controller.ts

@ -8,10 +8,10 @@ import {
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { ExtractProjectIdMiddleware } from '../../middlewares/extract-project-id/extract-project-id.middleware'; import { ExtractProjectIdMiddleware } from '../middlewares/extract-project-id/extract-project-id.middleware';
import extractRolesObj from '../../utils/extractRolesObj'; import extractRolesObj from '../utils/extractRolesObj';
import { AuthService } from './auth.service'; import { AuthService } from '../services/auth.service';
export class CreateUserDto { export class CreateUserDto {
readonly username: string; readonly username: string;

2
packages/nocodb-nest/src/modules/bases/bases.controller.spec.ts → packages/nocodb-nest/src/controllers/bases.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { BasesController } from './bases.controller'; import { BasesController } from './bases.controller';
import { BasesService } from './bases.service'; import { BasesService } from '../services/bases.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('BasesController', () => { describe('BasesController', () => {

8
packages/nocodb-nest/src/modules/bases/bases.controller.ts → packages/nocodb-nest/src/controllers/bases.controller.ts

@ -11,13 +11,13 @@ import {
} from '@nestjs/common'; } from '@nestjs/common';
import { BaseReqType } from 'nocodb-sdk'; import { BaseReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse'; import { PagedResponseImpl } from '../helpers/PagedResponse';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { BasesService } from './bases.service'; import { BasesService } from '../services/bases.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

0
packages/nocodb-nest/src/modules/datas/bulk-data-alias/bulk-data-alias.controller.spec.ts → packages/nocodb-nest/src/controllers/bulk-data-alias.controller.spec.ts

6
packages/nocodb-nest/src/modules/datas/bulk-data-alias/bulk-data-alias.controller.ts → packages/nocodb-nest/src/controllers/bulk-data-alias.controller.ts

@ -11,12 +11,12 @@ import {
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { BulkDataAliasService } from './bulk-data-alias.service'; import { BulkDataAliasService } from '../services/bulk-data-alias.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/caches/caches.controller.spec.ts → packages/nocodb-nest/src/controllers/caches.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { CachesController } from './caches.controller'; import { CachesController } from './caches.controller';
import { CachesService } from './caches.service'; import { CachesService } from '../services/caches.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('CachesController', () => { describe('CachesController', () => {

4
packages/nocodb-nest/src/modules/caches/caches.controller.ts → packages/nocodb-nest/src/controllers/caches.controller.ts

@ -1,6 +1,6 @@
import { Controller, Delete, Get } from '@nestjs/common'; import { Controller, Delete, Get } from '@nestjs/common';
import { Acl } from '../../middlewares/extract-project-id/extract-project-id.middleware'; import { Acl } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { CachesService } from './caches.service'; import { CachesService } from '../services/caches.service';
@Controller() @Controller()
export class CachesController { export class CachesController {

2
packages/nocodb-nest/src/modules/columns/columns.controller.spec.ts → packages/nocodb-nest/src/controllers/columns.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ColumnsController } from './columns.controller'; import { ColumnsController } from './columns.controller';
import { ColumnsService } from './columns.service'; import { ColumnsService } from '../services/columns.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ColumnsController', () => { describe('ColumnsController', () => {

6
packages/nocodb-nest/src/modules/columns/columns.controller.ts → packages/nocodb-nest/src/controllers/columns.controller.ts

@ -12,12 +12,12 @@ import {
} from '@nestjs/common'; } from '@nestjs/common';
import { ColumnReqType } from 'nocodb-sdk'; import { ColumnReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { ColumnsService } from './columns.service'; import { ColumnsService } from '../services/columns.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

0
packages/nocodb-nest/src/modules/datas/data-alias-export/data-alias-export.controller.spec.ts → packages/nocodb-nest/src/controllers/data-alias-export.controller.spec.ts

10
packages/nocodb-nest/src/modules/datas/data-alias-export/data-alias-export.controller.ts → packages/nocodb-nest/src/controllers/data-alias-export.controller.ts

@ -1,14 +1,14 @@
import { Controller, Get, Request, Response, UseGuards } from '@nestjs/common'; import { Controller, Get, Request, Response, UseGuards } from '@nestjs/common';
import * as XLSX from 'xlsx'; import * as XLSX from 'xlsx';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { View } from '../../../models'; import { View } from '../models';
import { DatasService } from '../datas.service'; import { DatasService } from '../services/datas.service';
import { extractCsvData, extractXlsxData } from '../helpers'; import { extractCsvData, extractXlsxData } from '../modules/datas/helpers';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

0
packages/nocodb-nest/src/modules/datas/data-alias-nested/data-alias-nested.controller.spec.ts → packages/nocodb-nest/src/controllers/data-alias-nested.controller.spec.ts

6
packages/nocodb-nest/src/modules/datas/data-alias-nested/data-alias-nested.controller.ts → packages/nocodb-nest/src/controllers/data-alias-nested.controller.ts

@ -9,12 +9,12 @@ import {
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { DataAliasNestedService } from './data-alias-nested.service'; import { DataAliasNestedService } from '../services/data-alias-nested.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/datas/data-alias-nested/data-alias-nested.service.spec.ts → packages/nocodb-nest/src/controllers/data-alias-nested.service.spec.ts

@ -1,5 +1,5 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { DataAliasNestedService } from './data-alias-nested.service'; import { DataAliasNestedService } from '../services/data-alias-nested.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('DataAliasNestedService', () => { describe('DataAliasNestedService', () => {

2
packages/nocodb-nest/src/modules/form-columns/form-columns.controller.spec.ts → packages/nocodb-nest/src/controllers/form-columns.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { FormColumnsController } from './form-columns.controller'; import { FormColumnsController } from './form-columns.controller';
import { FormColumnsService } from './form-columns.service'; import { FormColumnsService } from '../services/form-columns.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('FormColumnsController', () => { describe('FormColumnsController', () => {

6
packages/nocodb-nest/src/modules/form-columns/form-columns.controller.ts → packages/nocodb-nest/src/controllers/form-columns.controller.ts

@ -1,11 +1,11 @@
import { Body, Controller, Param, Patch, UseGuards } from '@nestjs/common'; import { Body, Controller, Param, Patch, UseGuards } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { FormColumnsService } from './form-columns.service'; import { FormColumnsService } from '../services/form-columns.service';
class FormColumnUpdateReqType {} class FormColumnUpdateReqType {}

2
packages/nocodb-nest/src/modules/forms/forms.controller.spec.ts → packages/nocodb-nest/src/controllers/forms.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { FormsController } from './forms.controller'; import { FormsController } from './forms.controller';
import { FormsService } from './forms.service'; import { FormsService } from '../services/forms.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('FormsController', () => { describe('FormsController', () => {

6
packages/nocodb-nest/src/modules/forms/forms.controller.ts → packages/nocodb-nest/src/controllers/forms.controller.ts

@ -9,12 +9,12 @@ import {
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { ViewCreateReqType } from 'nocodb-sdk'; import { ViewCreateReqType } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { FormsService } from './forms.service'; import { FormsService } from '../services/forms.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/galleries/galleries.controller.spec.ts → packages/nocodb-nest/src/controllers/galleries.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { GalleriesController } from './galleries.controller'; import { GalleriesController } from './galleries.controller';
import { GalleriesService } from './galleries.service'; import { GalleriesService } from '../services/galleries.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('GalleriesController', () => { describe('GalleriesController', () => {

6
packages/nocodb-nest/src/modules/galleries/galleries.controller.ts → packages/nocodb-nest/src/controllers/galleries.controller.ts

@ -10,12 +10,12 @@ import {
} from '@nestjs/common'; } from '@nestjs/common';
import { GalleryUpdateReqType, ViewCreateReqType } from 'nocodb-sdk'; import { GalleryUpdateReqType, ViewCreateReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { GalleriesService } from './galleries.service'; import { GalleriesService } from '../services/galleries.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/grid-columns/grid-columns.controller.spec.ts → packages/nocodb-nest/src/controllers/grid-columns.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { GridColumnsController } from './grid-columns.controller'; import { GridColumnsController } from './grid-columns.controller';
import { GridColumnsService } from './grid-columns.service'; import { GridColumnsService } from '../services/grid-columns.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('GridColumnsController', () => { describe('GridColumnsController', () => {

6
packages/nocodb-nest/src/modules/grid-columns/grid-columns.controller.ts → packages/nocodb-nest/src/controllers/grid-columns.controller.ts

@ -1,12 +1,12 @@
import { Body, Controller, Get, Param, Patch, UseGuards } from '@nestjs/common'; import { Body, Controller, Get, Param, Patch, UseGuards } from '@nestjs/common';
import { GridColumnReqType } from 'nocodb-sdk'; import { GridColumnReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { GridColumnsService } from './grid-columns.service'; import { GridColumnsService } from '../services/grid-columns.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/grids/grids.controller.spec.ts → packages/nocodb-nest/src/controllers/grids.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { GridsController } from './grids.controller'; import { GridsController } from './grids.controller';
import { GridsService } from './grids.service'; import { GridsService } from '../services/grids.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('GridsController', () => { describe('GridsController', () => {

6
packages/nocodb-nest/src/modules/grids/grids.controller.ts → packages/nocodb-nest/src/controllers/grids.controller.ts

@ -9,12 +9,12 @@ import {
} from '@nestjs/common'; } from '@nestjs/common';
import { ViewCreateReqType } from 'nocodb-sdk'; import { ViewCreateReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { GridsService } from './grids.service'; import { GridsService } from '../services/grids.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/hook-filters/hook-filters.controller.spec.ts → packages/nocodb-nest/src/controllers/hook-filters.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { HookFiltersController } from './hook-filters.controller'; import { HookFiltersController } from './hook-filters.controller';
import { HookFiltersService } from './hook-filters.service'; import { HookFiltersService } from '../services/hook-filters.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('HookFiltersController', () => { describe('HookFiltersController', () => {

2
packages/nocodb-nest/src/modules/hook-filters/hook-filters.controller.ts → packages/nocodb-nest/src/controllers/hook-filters.controller.ts

@ -1,5 +1,5 @@
import { Controller } from '@nestjs/common'; import { Controller } from '@nestjs/common';
import { HookFiltersService } from './hook-filters.service'; import { HookFiltersService } from '../services/hook-filters.service';
@Controller() @Controller()
export class HookFiltersController { export class HookFiltersController {

2
packages/nocodb-nest/src/modules/hooks/hooks.controller.spec.ts → packages/nocodb-nest/src/controllers/hooks.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { HooksController } from './hooks.controller'; import { HooksController } from './hooks.controller';
import { HooksService } from './hooks.service'; import { HooksService } from '../services/hooks.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('HooksController', () => { describe('HooksController', () => {

8
packages/nocodb-nest/src/modules/hooks/hooks.controller.ts → packages/nocodb-nest/src/controllers/hooks.controller.ts

@ -11,13 +11,13 @@ import {
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { HookReqType, HookTestReqType } from 'nocodb-sdk'; import { HookReqType, HookTestReqType } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse'; import { PagedResponseImpl } from '../helpers/PagedResponse';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { HooksService } from './hooks.service'; import { HooksService } from '../services/hooks.service';
import type { HookType } from 'nocodb-sdk'; import type { HookType } from 'nocodb-sdk';
@Controller() @Controller()

2
packages/nocodb-nest/src/modules/import/import.controller.spec.ts → packages/nocodb-nest/src/controllers/import.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ImportController } from './import.controller'; import { ImportController } from './import.controller';
import { ImportService } from './import.service'; import { ImportService } from '../services/import.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ImportController', () => { describe('ImportController', () => {

18
packages/nocodb-nest/src/modules/import/import.controller.ts → packages/nocodb-nest/src/controllers/import.controller.ts

@ -1,15 +1,15 @@
import { Controller, HttpCode, Post, Request, UseGuards } from '@nestjs/common'; import { Controller, HttpCode, Post, Request, UseGuards } from '@nestjs/common';
import { forwardRef, Inject } from '@nestjs/common'; import { forwardRef, Inject } from '@nestjs/common';
import { ModuleRef } from '@nestjs/core'; import { ModuleRef } from '@nestjs/core';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { NcError } from '../../helpers/catchError'; import { NcError } from '../helpers/catchError';
import { ExtractProjectIdMiddleware } from '../../middlewares/extract-project-id/extract-project-id.middleware'; import { ExtractProjectIdMiddleware } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { SyncSource } from '../../models'; import { SyncSource } from '../models';
import NocoJobs from '../../jobs/NocoJobs'; import NocoJobs from '../jobs/NocoJobs';
import { SocketService } from '../../services/client/socket.service'; import { SocketService } from '../services/socket.service';
import airtableSyncJob from '../sync/helpers/job'; import airtableSyncJob from '../modules/sync/helpers/job';
import { ImportService } from './import.service'; import { ImportService } from '../services/import.service';
import type { AirtableSyncConfig } from '../sync/helpers/job'; import type { AirtableSyncConfig } from '../modules/sync/helpers/job';
import type { Server } from 'socket.io'; import type { Server } from 'socket.io';

2
packages/nocodb-nest/src/modules/kanbans/kanbans.controller.spec.ts → packages/nocodb-nest/src/controllers/kanbans.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { KanbansController } from './kanbans.controller'; import { KanbansController } from './kanbans.controller';
import { KanbansService } from './kanbans.service'; import { KanbansService } from '../services/kanbans.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('KanbansController', () => { describe('KanbansController', () => {

6
packages/nocodb-nest/src/modules/kanbans/kanbans.controller.ts → packages/nocodb-nest/src/controllers/kanbans.controller.ts

@ -9,12 +9,12 @@ import {
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { ViewCreateReqType } from 'nocodb-sdk'; import { ViewCreateReqType } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { KanbansService } from './kanbans.service'; import { KanbansService } from '../services/kanbans.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/maps/maps.controller.spec.ts → packages/nocodb-nest/src/controllers/maps.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { MapsController } from './maps.controller'; import { MapsController } from './maps.controller';
import { MapsService } from './maps.service'; import { MapsService } from '../services/maps.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('MapsController', () => { describe('MapsController', () => {

6
packages/nocodb-nest/src/modules/maps/maps.controller.ts → packages/nocodb-nest/src/controllers/maps.controller.ts

@ -10,12 +10,12 @@ import {
} from '@nestjs/common'; } from '@nestjs/common';
import { MapUpdateReqType, ViewCreateReqType } from 'nocodb-sdk'; import { MapUpdateReqType, ViewCreateReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { MapsService } from './maps.service'; import { MapsService } from '../services/maps.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/meta-diffs/meta-diffs.controller.spec.ts → packages/nocodb-nest/src/controllers/meta-diffs.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { MetaDiffsController } from './meta-diffs.controller'; import { MetaDiffsController } from './meta-diffs.controller';
import { MetaDiffsService } from './meta-diffs.service'; import { MetaDiffsService } from '../services/meta-diffs.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('MetaDiffsController', () => { describe('MetaDiffsController', () => {

6
packages/nocodb-nest/src/modules/meta-diffs/meta-diffs.controller.ts → packages/nocodb-nest/src/controllers/meta-diffs.controller.ts

@ -7,12 +7,12 @@ import {
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { MetaDiffsService } from './meta-diffs.service'; import { MetaDiffsService } from '../services/meta-diffs.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/model-visibilities/model-visibilities.controller.spec.ts → packages/nocodb-nest/src/controllers/model-visibilities.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ModelVisibilitiesController } from './model-visibilities.controller'; import { ModelVisibilitiesController } from './model-visibilities.controller';
import { ModelVisibilitiesService } from './model-visibilities.service'; import { ModelVisibilitiesService } from '../services/model-visibilities.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ModelVisibilitiesController', () => { describe('ModelVisibilitiesController', () => {

6
packages/nocodb-nest/src/modules/model-visibilities/model-visibilities.controller.ts → packages/nocodb-nest/src/controllers/model-visibilities.controller.ts

@ -9,12 +9,12 @@ import {
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { ModelVisibilitiesService } from './model-visibilities.service'; import { ModelVisibilitiesService } from '../services/model-visibilities.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

0
packages/nocodb-nest/src/modules/datas/old-datas/old-datas.controller.spec.ts → packages/nocodb-nest/src/controllers/old-datas/old-datas.controller.spec.ts

4
packages/nocodb-nest/src/modules/datas/old-datas/old-datas.controller.ts → packages/nocodb-nest/src/controllers/old-datas/old-datas.controller.ts

@ -12,11 +12,11 @@ import {
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../../guards/global/global.guard'; import { GlobalGuard } from '../../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { OldDatasService } from './old-datas.service'; import { OldDatasService } from './old-datas.service';
@Controller() @Controller()

0
packages/nocodb-nest/src/modules/datas/old-datas/old-datas.service.spec.ts → packages/nocodb-nest/src/controllers/old-datas/old-datas.service.spec.ts

10
packages/nocodb-nest/src/modules/datas/old-datas/old-datas.service.ts → packages/nocodb-nest/src/controllers/old-datas/old-datas.service.ts

@ -1,10 +1,10 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { nocoExecute } from 'nc-help'; import { nocoExecute } from 'nc-help';
import getAst from '../../../helpers/getAst'; import getAst from '../../helpers/getAst';
import { NcError } from '../../../helpers/catchError'; import { NcError } from '../../helpers/catchError';
import { Base, Model, Project, View } from '../../../models'; import { Base, Model, Project, View } from '../../models';
import NcConnectionMgrv2 from '../../../utils/common/NcConnectionMgrv2'; import NcConnectionMgrv2 from '../../utils/common/NcConnectionMgrv2';
import type { OldPathParams } from '../helpers'; import type { OldPathParams } from '../../modules/datas/helpers';
@Injectable() @Injectable()
export class OldDatasService { export class OldDatasService {

2
packages/nocodb-nest/src/modules/org-lcense/org-lcense.controller.spec.ts → packages/nocodb-nest/src/controllers/org-lcense.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { OrgLcenseController } from './org-lcense.controller'; import { OrgLcenseController } from './org-lcense.controller';
import { OrgLcenseService } from './org-lcense.service'; import { OrgLcenseService } from '../services/org-lcense.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('OrgLcenseController', () => { describe('OrgLcenseController', () => {

6
packages/nocodb-nest/src/modules/org-lcense/org-lcense.controller.ts → packages/nocodb-nest/src/controllers/org-lcense.controller.ts

@ -7,9 +7,9 @@ import {
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { OrgUserRoles } from 'nocodb-sdk'; import { OrgUserRoles } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { Acl } from '../../middlewares/extract-project-id/extract-project-id.middleware'; import { Acl } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { OrgLcenseService } from './org-lcense.service'; import { OrgLcenseService } from '../services/org-lcense.service';
@Controller() @Controller()
@UseGuards(GlobalGuard) @UseGuards(GlobalGuard)

2
packages/nocodb-nest/src/modules/org-tokens/org-tokens.controller.spec.ts → packages/nocodb-nest/src/controllers/org-tokens.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { OrgTokensController } from './org-tokens.controller'; import { OrgTokensController } from './org-tokens.controller';
import { OrgTokensService } from './org-tokens.service'; import { OrgTokensService } from '../services/org-tokens.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('OrgTokensController', () => { describe('OrgTokensController', () => {

8
packages/nocodb-nest/src/modules/org-tokens/org-tokens.controller.ts → packages/nocodb-nest/src/controllers/org-tokens.controller.ts

@ -11,13 +11,13 @@ import {
} from '@nestjs/common'; } from '@nestjs/common';
import { ApiTokenReqType } from 'nocodb-sdk'; import { ApiTokenReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { getConditionalHandler } from '../../helpers/getHandler'; import { getConditionalHandler } from '../helpers/getHandler';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { OrgTokensEeService } from './ee/org-tokens/org-tokens-ee.service'; import { OrgTokensEeService } from '../services/org-tokens-ee.service';
import { OrgTokensService } from './org-tokens.service'; import { OrgTokensService } from '../services/org-tokens.service';
@UseGuards(ExtractProjectIdMiddleware, AuthGuard('jwt')) @UseGuards(ExtractProjectIdMiddleware, AuthGuard('jwt'))
@Controller() @Controller()

2
packages/nocodb-nest/src/modules/org-users/org-users.controller.spec.ts → packages/nocodb-nest/src/controllers/org-users.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { OrgUsersController } from './org-users.controller'; import { OrgUsersController } from './org-users.controller';
import { OrgUsersService } from './org-users.service'; import { OrgUsersService } from '../services/org-users.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('OrgUsersController', () => { describe('OrgUsersController', () => {

10
packages/nocodb-nest/src/modules/org-users/org-users.controller.ts → packages/nocodb-nest/src/controllers/org-users.controller.ts

@ -12,14 +12,14 @@ import {
} from '@nestjs/common'; } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { OrgUserRoles } from 'nocodb-sdk'; import { OrgUserRoles } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse'; import { PagedResponseImpl } from '../helpers/PagedResponse';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { User } from '../../models'; import { User } from '../models';
import { OrgUsersService } from './org-users.service'; import { OrgUsersService } from '../services/org-users.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/plugins/plugins.controller.spec.ts → packages/nocodb-nest/src/controllers/plugins.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { PluginsController } from './plugins.controller'; import { PluginsController } from './plugins.controller';
import { PluginsService } from './plugins.service'; import { PluginsService } from '../services/plugins.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('PluginsController', () => { describe('PluginsController', () => {

8
packages/nocodb-nest/src/modules/plugins/plugins.controller.ts → packages/nocodb-nest/src/controllers/plugins.controller.ts

@ -8,10 +8,10 @@ import {
Post, Post,
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse'; import { PagedResponseImpl } from '../helpers/PagedResponse';
import { Acl } from '../../middlewares/extract-project-id/extract-project-id.middleware'; import { Acl } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { PluginsService } from './plugins.service'; import { PluginsService } from '../services/plugins.service';
// todo: move to a interceptor // todo: move to a interceptor
const blockInCloudMw = (_req, res, next) => { const blockInCloudMw = (_req, res, next) => {

2
packages/nocodb-nest/src/modules/projects/projects.controller.spec.ts → packages/nocodb-nest/src/controllers/projects.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ProjectsController } from './projects.controller'; import { ProjectsController } from './projects.controller';
import { ProjectsService } from './projects.service'; import { ProjectsService } from '../services/projects.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ProjectsController', () => { describe('ProjectsController', () => {

12
packages/nocodb-nest/src/modules/projects/projects.controller.ts → packages/nocodb-nest/src/controllers/projects.controller.ts

@ -14,16 +14,16 @@ import {
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import isDocker from 'is-docker'; import isDocker from 'is-docker';
import { ProjectReqType } from 'nocodb-sdk'; import { ProjectReqType } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse'; import { PagedResponseImpl } from '../helpers/PagedResponse';
import { import {
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
UseAclMiddleware, UseAclMiddleware,
UseProjectIdMiddleware, UseProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import Noco from '../../Noco'; import Noco from '../Noco';
import { packageVersion } from '../../utils/packageVersion'; import { packageVersion } from '../utils/packageVersion';
import { ProjectsService } from './projects.service'; import { ProjectsService } from '../services/projects.service';
import type { ProjectType } from 'nocodb-sdk'; import type { ProjectType } from 'nocodb-sdk';
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/public-datas-export/public-datas-export.controller.spec.ts → packages/nocodb-nest/src/controllers/public-datas-export.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { PublicDatasExportController } from './public-datas-export.controller'; import { PublicDatasExportController } from './public-datas-export.controller';
import { PublicDatasExportService } from './public-datas-export.service'; import { PublicDatasExportService } from '../services/public-datas-export.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('PublicDatasExportController', () => { describe('PublicDatasExportController', () => {

14
packages/nocodb-nest/src/modules/public-datas-export/public-datas-export.controller.ts → packages/nocodb-nest/src/controllers/public-datas-export.controller.ts

@ -3,13 +3,13 @@ import { ErrorMessages, isSystemColumn, UITypes, ViewTypes } from 'nocodb-sdk';
import * as XLSX from 'xlsx'; import * as XLSX from 'xlsx';
import { nocoExecute } from 'nc-help'; import { nocoExecute } from 'nc-help';
import papaparse from 'papaparse'; import papaparse from 'papaparse';
import { NcError } from '../../helpers/catchError'; import { NcError } from '../helpers/catchError';
import getAst from '../../helpers/getAst'; import getAst from '../helpers/getAst';
import { Base, Column, Model, View } from '../../models'; import { Base, Column, Model, View } from '../models';
import NcConnectionMgrv2 from '../../utils/common/NcConnectionMgrv2'; import NcConnectionMgrv2 from '../utils/common/NcConnectionMgrv2';
import { serializeCellValue } from '../datas/helpers'; import { serializeCellValue } from '../modules/datas/helpers';
import { PublicDatasExportService } from './public-datas-export.service'; import { PublicDatasExportService } from '../services/public-datas-export.service';
import type { LinkToAnotherRecordColumn, LookupColumn } from '../../models'; import type { LinkToAnotherRecordColumn, LookupColumn } from '../models';
@Controller() @Controller()
export class PublicDatasExportController { export class PublicDatasExportController {

2
packages/nocodb-nest/src/modules/public-datas/public-datas.controller.spec.ts → packages/nocodb-nest/src/controllers/public-datas.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { PublicDatasController } from './public-datas.controller'; import { PublicDatasController } from './public-datas.controller';
import { PublicDatasService } from './public-datas.service'; import { PublicDatasService } from '../services/public-datas.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('PublicDatasController', () => { describe('PublicDatasController', () => {

4
packages/nocodb-nest/src/modules/public-datas/public-datas.controller.ts → packages/nocodb-nest/src/controllers/public-datas.controller.ts

@ -9,8 +9,8 @@ import {
} from '@nestjs/common'; } from '@nestjs/common';
import { AnyFilesInterceptor } from '@nestjs/platform-express'; import { AnyFilesInterceptor } from '@nestjs/platform-express';
import multer from 'multer'; import multer from 'multer';
import { NC_ATTACHMENT_FIELD_SIZE } from '../../constants'; import { NC_ATTACHMENT_FIELD_SIZE } from '../constants';
import { PublicDatasService } from './public-datas.service'; import { PublicDatasService } from '../services/public-datas.service';
@Controller() @Controller()
export class PublicDatasController { export class PublicDatasController {

2
packages/nocodb-nest/src/modules/public-metas/public-metas.controller.spec.ts → packages/nocodb-nest/src/controllers/public-metas.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { PublicMetasController } from './public-metas.controller'; import { PublicMetasController } from './public-metas.controller';
import { PublicMetasService } from './public-metas.service'; import { PublicMetasService } from '../services/public-metas.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('PublicMetasController', () => { describe('PublicMetasController', () => {

2
packages/nocodb-nest/src/modules/public-metas/public-metas.controller.ts → packages/nocodb-nest/src/controllers/public-metas.controller.ts

@ -1,5 +1,5 @@
import { Controller, Get, Param, Request } from '@nestjs/common'; import { Controller, Get, Param, Request } from '@nestjs/common';
import { PublicMetasService } from './public-metas.service'; import { PublicMetasService } from '../services/public-metas.service';
@Controller() @Controller()
export class PublicMetasController { export class PublicMetasController {

2
packages/nocodb-nest/src/modules/shared-bases/shared-bases.controller.spec.ts → packages/nocodb-nest/src/controllers/shared-bases.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { SharedBasesController } from './shared-bases.controller'; import { SharedBasesController } from './shared-bases.controller';
import { SharedBasesService } from './shared-bases.service'; import { SharedBasesService } from '../services/shared-bases.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('SharedBasesController', () => { describe('SharedBasesController', () => {

6
packages/nocodb-nest/src/modules/shared-bases/shared-bases.controller.ts → packages/nocodb-nest/src/controllers/shared-bases.controller.ts

@ -11,12 +11,12 @@ import {
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { SharedBasesService } from './shared-bases.service'; import { SharedBasesService } from '../services/shared-bases.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/sorts/sorts.controller.spec.ts → packages/nocodb-nest/src/controllers/sorts.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { SortsController } from './sorts.controller'; import { SortsController } from './sorts.controller';
import { SortsService } from './sorts.service'; import { SortsService } from '../services/sorts.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('SortsController', () => { describe('SortsController', () => {

8
packages/nocodb-nest/src/modules/sorts/sorts.controller.ts → packages/nocodb-nest/src/controllers/sorts.controller.ts

@ -11,13 +11,13 @@ import {
} from '@nestjs/common'; } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { SortReqType } from 'nocodb-sdk'; import { SortReqType } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse'; import { PagedResponseImpl } from '../helpers/PagedResponse';
import { import {
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
UseAclMiddleware, UseAclMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { SortsService } from './sorts.service'; import { SortsService } from '../services/sorts.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/sync/sync.controller.spec.ts → packages/nocodb-nest/src/controllers/sync.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { SyncController } from './sync.controller'; import { SyncController } from './sync.controller';
import { SyncService } from './sync.service'; import { SyncService } from '../services/sync.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('SyncController', () => { describe('SyncController', () => {

6
packages/nocodb-nest/src/modules/sync/sync.controller.ts → packages/nocodb-nest/src/controllers/sync.controller.ts

@ -10,12 +10,12 @@ import {
Req, Req,
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { SyncService } from './sync.service'; import { SyncService } from '../services/sync.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/tables/tables.controller.spec.ts → packages/nocodb-nest/src/controllers/tables.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { TablesController } from './tables.controller'; import { TablesController } from './tables.controller';
import { TablesService } from './tables.service'; import { TablesService } from '../services/tables.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('TablesController', () => { describe('TablesController', () => {

10
packages/nocodb-nest/src/modules/tables/tables.controller.ts → packages/nocodb-nest/src/controllers/tables.controller.ts

@ -13,14 +13,14 @@ import {
} from '@nestjs/common'; } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { TableReqType } from 'nocodb-sdk'; import { TableReqType } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import extractRolesObj from '../../utils/extractRolesObj'; import extractRolesObj from '../utils/extractRolesObj';
import { PagedResponseImpl } from '../../helpers/PagedResponse'; import { PagedResponseImpl } from '../helpers/PagedResponse';
import { import {
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
UseAclMiddleware, UseAclMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { TablesService } from './tables.service'; import { TablesService } from '../services/tables.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/utils/utils.controller.spec.ts → packages/nocodb-nest/src/controllers/utils.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { UtilsController } from './utils.controller'; import { UtilsController } from './utils.controller';
import { UtilsService } from './utils.service'; import { UtilsService } from '../services/utils.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('UtilsController', () => { describe('UtilsController', () => {

6
packages/nocodb-nest/src/modules/utils/utils.controller.ts → packages/nocodb-nest/src/controllers/utils.controller.ts

@ -7,12 +7,12 @@ import {
Request, Request,
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { UtilsService } from './utils.service'; import { UtilsService } from '../services/utils.service';
@Controller() @Controller()
export class UtilsController { export class UtilsController {

2
packages/nocodb-nest/src/modules/view-columns/view-columns.controller.spec.ts → packages/nocodb-nest/src/controllers/view-columns.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ViewColumnsController } from './view-columns.controller'; import { ViewColumnsController } from './view-columns.controller';
import { ViewColumnsService } from './view-columns.service'; import { ViewColumnsService } from '../services/view-columns.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ViewColumnsController', () => { describe('ViewColumnsController', () => {

8
packages/nocodb-nest/src/modules/view-columns/view-columns.controller.ts → packages/nocodb-nest/src/controllers/view-columns.controller.ts

@ -10,13 +10,13 @@ import {
} from '@nestjs/common'; } from '@nestjs/common';
import { ColumnReqType, ViewColumnReqType } from 'nocodb-sdk'; import { ColumnReqType, ViewColumnReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse'; import { PagedResponseImpl } from '../helpers/PagedResponse';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { ViewColumnsService } from './view-columns.service'; import { ViewColumnsService } from '../services/view-columns.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/views/views.controller.spec.ts → packages/nocodb-nest/src/controllers/views.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ViewsController } from './views.controller'; import { ViewsController } from './views.controller';
import { ViewsService } from './views.service'; import { ViewsService } from '../services/views.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ViewsController', () => { describe('ViewsController', () => {

8
packages/nocodb-nest/src/modules/views/views.controller.ts → packages/nocodb-nest/src/controllers/views.controller.ts

@ -12,13 +12,13 @@ import {
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { ViewUpdateReqType } from 'nocodb-sdk'; import { ViewUpdateReqType } from 'nocodb-sdk';
import { PagedResponseImpl } from '../../helpers/PagedResponse'; import { PagedResponseImpl } from '../helpers/PagedResponse';
import { import {
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
UseAclMiddleware, UseAclMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../guards/global/global.guard';
import { ViewsService } from './views.service'; import { ViewsService } from '../services/views.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

0
packages/nocodb-nest/src/modules/api-docs/api-docs.service.spec.ts → packages/nocodb-nest/src/modules/api-docs.service.spec.ts

4
packages/nocodb-nest/src/modules/api-docs/api-docs.service.ts → packages/nocodb-nest/src/modules/api-docs.service.ts

@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { NcError } from '../../helpers/catchError'; import { NcError } from '../helpers/catchError';
import { Model, Project } from '../../models'; import { Model, Project } from '../models';
import getSwaggerJSON from './swagger/getSwaggerJSON'; import getSwaggerJSON from './swagger/getSwaggerJSON';
@Injectable() @Injectable()

4
packages/nocodb-nest/src/modules/api-docs/api-docs.module.ts

@ -1,6 +1,6 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { ApiDocsService } from './api-docs.service'; import { ApiDocsService } from '../api-docs.service';
import { ApiDocsController } from './api-docs.controller'; import { ApiDocsController } from '../../controllers/api-docs/api-docs.controller';
@Module({ @Module({
controllers: [ApiDocsController], controllers: [ApiDocsController],

4
packages/nocodb-nest/src/modules/api-tokens/api-tokens.module.ts

@ -1,6 +1,6 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { ApiTokensService } from './api-tokens.service'; import { ApiTokensService } from '../../services/api-tokens.service';
import { ApiTokensController } from './api-tokens.controller'; import { ApiTokensController } from '../../controllers/api-tokens.controller';
@Module({ @Module({
controllers: [ApiTokensController], controllers: [ApiTokensController],

4
packages/nocodb-nest/src/modules/audits/audits.module.ts

@ -1,6 +1,6 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { AuditsService } from './audits.service'; import { AuditsService } from '../../services/audits.service';
import { AuditsController } from './audits.controller'; import { AuditsController } from '../../controllers/audits.controller';
@Module({ @Module({
controllers: [AuditsController], controllers: [AuditsController],

4
packages/nocodb-nest/src/modules/auth/auth.module.ts

@ -3,8 +3,8 @@ import { JwtModule } from '@nestjs/jwt';
import { PassportModule } from '@nestjs/passport'; import { PassportModule } from '@nestjs/passport';
import { LocalStrategy } from '../../strategies/local.strategy'; import { LocalStrategy } from '../../strategies/local.strategy';
import { UsersModule } from '../users/users.module'; import { UsersModule } from '../users/users.module';
import { AuthService } from './auth.service'; import { AuthService } from '../../services/auth.service';
import { AuthController } from './auth.controller'; import { AuthController } from '../../controllers/auth.controller';
@Module({ @Module({
controllers: [AuthController], controllers: [AuthController],

4
packages/nocodb-nest/src/modules/bases/bases.module.ts

@ -1,6 +1,6 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { BasesService } from './bases.service'; import { BasesService } from '../../services/bases.service';
import { BasesController } from './bases.controller'; import { BasesController } from '../../controllers/bases.controller';
@Module({ @Module({
controllers: [BasesController], controllers: [BasesController],

4
packages/nocodb-nest/src/modules/caches/caches.module.ts

@ -1,6 +1,6 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { CachesService } from './caches.service'; import { CachesService } from '../../services/caches.service';
import { CachesController } from './caches.controller'; import { CachesController } from '../../controllers/caches.controller';
@Module({ @Module({
controllers: [CachesController], controllers: [CachesController],

4
packages/nocodb-nest/src/modules/columns/columns.module.ts

@ -1,6 +1,6 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { ColumnsService } from './columns.service'; import { ColumnsService } from '../../services/columns.service';
import { ColumnsController } from './columns.controller'; import { ColumnsController } from '../../controllers/columns.controller';
@Module({ @Module({
controllers: [ColumnsController], controllers: [ColumnsController],

2
packages/nocodb-nest/src/modules/datas/data-alias.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { DataAliasController } from './data-alias.controller'; import { DataAliasController } from './data-alias.controller';
import { DatasService } from './datas.service'; import { DatasService } from '../../services/datas.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('DataAliasController', () => { describe('DataAliasController', () => {

2
packages/nocodb-nest/src/modules/datas/data-alias.controller.ts

@ -18,7 +18,7 @@ import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { DatasService } from './datas.service'; import { DatasService } from '../../services/datas.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

2
packages/nocodb-nest/src/modules/datas/datas.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { DatasController } from './datas.controller'; import { DatasController } from './datas.controller';
import { DatasService } from './datas.service'; import { DatasService } from '../../services/datas.service';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('DatasController', () => { describe('DatasController', () => {

2
packages/nocodb-nest/src/modules/datas/datas.controller.ts

@ -15,7 +15,7 @@ import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware'; } from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { DatasService } from './datas.service'; import { DatasService } from '../../services/datas.service';
@Controller() @Controller()
@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) @UseGuards(ExtractProjectIdMiddleware, GlobalGuard)

16
packages/nocodb-nest/src/modules/datas/datas.module.ts

@ -1,14 +1,14 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { DataAliasController } from './data-alias.controller'; import { DataAliasController } from './data-alias.controller';
import { DatasService } from './datas.service'; import { DatasService } from '../../services/datas.service';
import { DatasController } from './datas.controller'; import { DatasController } from './datas.controller';
import { BulkDataAliasController } from './bulk-data-alias/bulk-data-alias.controller'; import { BulkDataAliasController } from '../../controllers/bulk-data-alias.controller';
import { DataAliasExportController } from './data-alias-export/data-alias-export.controller'; import { DataAliasExportController } from '../../controllers/data-alias-export.controller';
import { DataAliasNestedController } from './data-alias-nested/data-alias-nested.controller'; import { DataAliasNestedController } from '../../controllers/data-alias-nested.controller';
import { OldDatasController } from './old-datas/old-datas.controller'; import { OldDatasController } from '../../controllers/old-datas/old-datas.controller';
import { BulkDataAliasService } from './bulk-data-alias/bulk-data-alias.service'; import { BulkDataAliasService } from '../../services/bulk-data-alias.service';
import { DataAliasNestedService } from './data-alias-nested/data-alias-nested.service'; import { DataAliasNestedService } from '../../services/data-alias-nested.service';
import { OldDatasService } from './old-datas/old-datas.service'; import { OldDatasService } from '../../controllers/old-datas/old-datas.service';
@Module({ @Module({
controllers: [ controllers: [

4
packages/nocodb-nest/src/modules/form-columns/form-columns.module.ts

@ -1,6 +1,6 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { FormColumnsService } from './form-columns.service'; import { FormColumnsService } from '../../services/form-columns.service';
import { FormColumnsController } from './form-columns.controller'; import { FormColumnsController } from '../../controllers/form-columns.controller';
@Module({ @Module({
controllers: [FormColumnsController], controllers: [FormColumnsController],

4
packages/nocodb-nest/src/modules/forms/forms.module.ts

@ -1,6 +1,6 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { FormsService } from './forms.service'; import { FormsService } from '../../services/forms.service';
import { FormsController } from './forms.controller'; import { FormsController } from '../../controllers/forms.controller';
@Module({ @Module({
controllers: [FormsController], controllers: [FormsController],

4
packages/nocodb-nest/src/modules/galleries/galleries.module.ts

@ -1,6 +1,6 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { GalleriesService } from './galleries.service'; import { GalleriesService } from '../../services/galleries.service';
import { GalleriesController } from './galleries.controller'; import { GalleriesController } from '../../controllers/galleries.controller';
@Module({ @Module({
controllers: [GalleriesController], controllers: [GalleriesController],

4
packages/nocodb-nest/src/modules/grid-columns/grid-columns.module.ts

@ -1,6 +1,6 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { GridColumnsService } from './grid-columns.service'; import { GridColumnsService } from '../../services/grid-columns.service';
import { GridColumnsController } from './grid-columns.controller'; import { GridColumnsController } from '../../controllers/grid-columns.controller';
@Module({ @Module({
controllers: [GridColumnsController], controllers: [GridColumnsController],

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save