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 { GlobalMiddleware } from './middlewares/global/global.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 { MetaService } from './meta/meta.service';
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 { ApiDocsController } from './api-docs.controller';
import { ApiDocsService } from './api-docs.service';
import { ApiDocsService } from '../../modules/api-docs.service';
import type { TestingModule } from '@nestjs/testing';
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,
ExtractProjectIdMiddleware,
} 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 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 { ApiTokensController } from './api-tokens.controller';
import { ApiTokensService } from './api-tokens.service';
import { ApiTokensService } from '../services/api-tokens.service';
import type { TestingModule } from '@nestjs/testing';
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,
} from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse';
import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../helpers/PagedResponse';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { ApiTokensService } from './api-tokens.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { ApiTokensService } from '../services/api-tokens.service';
@Controller()
@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 { AuditsController } from './audits.controller';
import { AuditsService } from './audits.service';
import { AuditsService } from '../services/audits.service';
import type { TestingModule } from '@nestjs/testing';
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,
} from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse';
import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../helpers/PagedResponse';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { Audit } from '../../models';
import { AuditsService } from './audits.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { Audit } from '../models';
import { AuditsService } from '../services/audits.service';
@Controller()
@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 { AuthController } from './auth.controller';
import { AuthService } from './auth.service';
import { AuthService } from '../services/auth.service';
import type { TestingModule } from '@nestjs/testing';
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,
} from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard';
import { ExtractProjectIdMiddleware } from '../../middlewares/extract-project-id/extract-project-id.middleware';
import extractRolesObj from '../../utils/extractRolesObj';
import { AuthService } from './auth.service';
import { GlobalGuard } from '../guards/global/global.guard';
import { ExtractProjectIdMiddleware } from '../middlewares/extract-project-id/extract-project-id.middleware';
import extractRolesObj from '../utils/extractRolesObj';
import { AuthService } from '../services/auth.service';
export class CreateUserDto {
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 { BasesController } from './bases.controller';
import { BasesService } from './bases.service';
import { BasesService } from '../services/bases.service';
import type { TestingModule } from '@nestjs/testing';
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';
import { BaseReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse';
import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../helpers/PagedResponse';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { BasesService } from './bases.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { BasesService } from '../services/bases.service';
@Controller()
@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,
} from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../../middlewares/extract-project-id/extract-project-id.middleware';
import { BulkDataAliasService } from './bulk-data-alias.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { BulkDataAliasService } from '../services/bulk-data-alias.service';
@Controller()
@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 { CachesController } from './caches.controller';
import { CachesService } from './caches.service';
import { CachesService } from '../services/caches.service';
import type { TestingModule } from '@nestjs/testing';
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 { Acl } from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { CachesService } from './caches.service';
import { Acl } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { CachesService } from '../services/caches.service';
@Controller()
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 { ColumnsController } from './columns.controller';
import { ColumnsService } from './columns.service';
import { ColumnsService } from '../services/columns.service';
import type { TestingModule } from '@nestjs/testing';
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';
import { ColumnReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { ColumnsService } from './columns.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { ColumnsService } from '../services/columns.service';
@Controller()
@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 * as XLSX from 'xlsx';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../../middlewares/extract-project-id/extract-project-id.middleware';
import { View } from '../../../models';
import { DatasService } from '../datas.service';
import { extractCsvData, extractXlsxData } from '../helpers';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { View } from '../models';
import { DatasService } from '../services/datas.service';
import { extractCsvData, extractXlsxData } from '../modules/datas/helpers';
@Controller()
@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,
} from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../../middlewares/extract-project-id/extract-project-id.middleware';
import { DataAliasNestedService } from './data-alias-nested.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { DataAliasNestedService } from '../services/data-alias-nested.service';
@Controller()
@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 { DataAliasNestedService } from './data-alias-nested.service';
import { DataAliasNestedService } from '../services/data-alias-nested.service';
import type { TestingModule } from '@nestjs/testing';
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 { FormColumnsController } from './form-columns.controller';
import { FormColumnsService } from './form-columns.service';
import { FormColumnsService } from '../services/form-columns.service';
import type { TestingModule } from '@nestjs/testing';
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 { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { FormColumnsService } from './form-columns.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { FormColumnsService } from '../services/form-columns.service';
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 { FormsController } from './forms.controller';
import { FormsService } from './forms.service';
import { FormsService } from '../services/forms.service';
import type { TestingModule } from '@nestjs/testing';
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,
} from '@nestjs/common';
import { ViewCreateReqType } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { FormsService } from './forms.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { FormsService } from '../services/forms.service';
@Controller()
@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 { GalleriesController } from './galleries.controller';
import { GalleriesService } from './galleries.service';
import { GalleriesService } from '../services/galleries.service';
import type { TestingModule } from '@nestjs/testing';
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';
import { GalleryUpdateReqType, ViewCreateReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { GalleriesService } from './galleries.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { GalleriesService } from '../services/galleries.service';
@Controller()
@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 { GridColumnsController } from './grid-columns.controller';
import { GridColumnsService } from './grid-columns.service';
import { GridColumnsService } from '../services/grid-columns.service';
import type { TestingModule } from '@nestjs/testing';
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 { GridColumnReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { GridColumnsService } from './grid-columns.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { GridColumnsService } from '../services/grid-columns.service';
@Controller()
@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 { GridsController } from './grids.controller';
import { GridsService } from './grids.service';
import { GridsService } from '../services/grids.service';
import type { TestingModule } from '@nestjs/testing';
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';
import { ViewCreateReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { GridsService } from './grids.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { GridsService } from '../services/grids.service';
@Controller()
@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 { HookFiltersController } from './hook-filters.controller';
import { HookFiltersService } from './hook-filters.service';
import { HookFiltersService } from '../services/hook-filters.service';
import type { TestingModule } from '@nestjs/testing';
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 { HookFiltersService } from './hook-filters.service';
import { HookFiltersService } from '../services/hook-filters.service';
@Controller()
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 { HooksController } from './hooks.controller';
import { HooksService } from './hooks.service';
import { HooksService } from '../services/hooks.service';
import type { TestingModule } from '@nestjs/testing';
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,
} from '@nestjs/common';
import { HookReqType, HookTestReqType } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse';
import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../helpers/PagedResponse';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { HooksService } from './hooks.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { HooksService } from '../services/hooks.service';
import type { HookType } from 'nocodb-sdk';
@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 { ImportController } from './import.controller';
import { ImportService } from './import.service';
import { ImportService } from '../services/import.service';
import type { TestingModule } from '@nestjs/testing';
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 { forwardRef, Inject } from '@nestjs/common';
import { ModuleRef } from '@nestjs/core';
import { GlobalGuard } from '../../guards/global/global.guard';
import { NcError } from '../../helpers/catchError';
import { ExtractProjectIdMiddleware } from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { SyncSource } from '../../models';
import NocoJobs from '../../jobs/NocoJobs';
import { SocketService } from '../../services/client/socket.service';
import airtableSyncJob from '../sync/helpers/job';
import { ImportService } from './import.service';
import type { AirtableSyncConfig } from '../sync/helpers/job';
import { GlobalGuard } from '../guards/global/global.guard';
import { NcError } from '../helpers/catchError';
import { ExtractProjectIdMiddleware } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { SyncSource } from '../models';
import NocoJobs from '../jobs/NocoJobs';
import { SocketService } from '../services/socket.service';
import airtableSyncJob from '../modules/sync/helpers/job';
import { ImportService } from '../services/import.service';
import type { AirtableSyncConfig } from '../modules/sync/helpers/job';
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 { KanbansController } from './kanbans.controller';
import { KanbansService } from './kanbans.service';
import { KanbansService } from '../services/kanbans.service';
import type { TestingModule } from '@nestjs/testing';
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,
} from '@nestjs/common';
import { ViewCreateReqType } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { KanbansService } from './kanbans.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { KanbansService } from '../services/kanbans.service';
@Controller()
@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 { MapsController } from './maps.controller';
import { MapsService } from './maps.service';
import { MapsService } from '../services/maps.service';
import type { TestingModule } from '@nestjs/testing';
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';
import { MapUpdateReqType, ViewCreateReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { MapsService } from './maps.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { MapsService } from '../services/maps.service';
@Controller()
@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 { MetaDiffsController } from './meta-diffs.controller';
import { MetaDiffsService } from './meta-diffs.service';
import { MetaDiffsService } from '../services/meta-diffs.service';
import type { TestingModule } from '@nestjs/testing';
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,
} from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { MetaDiffsService } from './meta-diffs.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { MetaDiffsService } from '../services/meta-diffs.service';
@Controller()
@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 { ModelVisibilitiesController } from './model-visibilities.controller';
import { ModelVisibilitiesService } from './model-visibilities.service';
import { ModelVisibilitiesService } from '../services/model-visibilities.service';
import type { TestingModule } from '@nestjs/testing';
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,
} from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { ModelVisibilitiesService } from './model-visibilities.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { ModelVisibilitiesService } from '../services/model-visibilities.service';
@Controller()
@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,
} from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../../guards/global/global.guard';
import { GlobalGuard } from '../../guards/global/global.guard';
import {
Acl,
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';
@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 { nocoExecute } from 'nc-help';
import getAst from '../../../helpers/getAst';
import { NcError } from '../../../helpers/catchError';
import { Base, Model, Project, View } from '../../../models';
import NcConnectionMgrv2 from '../../../utils/common/NcConnectionMgrv2';
import type { OldPathParams } from '../helpers';
import getAst from '../../helpers/getAst';
import { NcError } from '../../helpers/catchError';
import { Base, Model, Project, View } from '../../models';
import NcConnectionMgrv2 from '../../utils/common/NcConnectionMgrv2';
import type { OldPathParams } from '../../modules/datas/helpers';
@Injectable()
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 { OrgLcenseController } from './org-lcense.controller';
import { OrgLcenseService } from './org-lcense.service';
import { OrgLcenseService } from '../services/org-lcense.service';
import type { TestingModule } from '@nestjs/testing';
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,
} from '@nestjs/common';
import { OrgUserRoles } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard';
import { Acl } from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { OrgLcenseService } from './org-lcense.service';
import { GlobalGuard } from '../guards/global/global.guard';
import { Acl } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { OrgLcenseService } from '../services/org-lcense.service';
@Controller()
@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 { OrgTokensController } from './org-tokens.controller';
import { OrgTokensService } from './org-tokens.service';
import { OrgTokensService } from '../services/org-tokens.service';
import type { TestingModule } from '@nestjs/testing';
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';
import { ApiTokenReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport';
import { getConditionalHandler } from '../../helpers/getHandler';
import { getConditionalHandler } from '../helpers/getHandler';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { OrgTokensEeService } from './ee/org-tokens/org-tokens-ee.service';
import { OrgTokensService } from './org-tokens.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { OrgTokensEeService } from '../services/org-tokens-ee.service';
import { OrgTokensService } from '../services/org-tokens.service';
@UseGuards(ExtractProjectIdMiddleware, AuthGuard('jwt'))
@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 { OrgUsersController } from './org-users.controller';
import { OrgUsersService } from './org-users.service';
import { OrgUsersService } from '../services/org-users.service';
import type { TestingModule } from '@nestjs/testing';
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';
import { AuthGuard } from '@nestjs/passport';
import { OrgUserRoles } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse';
import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../helpers/PagedResponse';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { User } from '../../models';
import { OrgUsersService } from './org-users.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { User } from '../models';
import { OrgUsersService } from '../services/org-users.service';
@Controller()
@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 { PluginsController } from './plugins.controller';
import { PluginsService } from './plugins.service';
import { PluginsService } from '../services/plugins.service';
import type { TestingModule } from '@nestjs/testing';
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,
UseGuards,
} from '@nestjs/common';
import { GlobalGuard } from '../../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse';
import { Acl } from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { PluginsService } from './plugins.service';
import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../helpers/PagedResponse';
import { Acl } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { PluginsService } from '../services/plugins.service';
// todo: move to a interceptor
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 { ProjectsController } from './projects.controller';
import { ProjectsService } from './projects.service';
import { ProjectsService } from '../services/projects.service';
import type { TestingModule } from '@nestjs/testing';
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 isDocker from 'is-docker';
import { ProjectReqType } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse';
import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../helpers/PagedResponse';
import {
ExtractProjectIdMiddleware,
UseAclMiddleware,
UseProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import Noco from '../../Noco';
import { packageVersion } from '../../utils/packageVersion';
import { ProjectsService } from './projects.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import Noco from '../Noco';
import { packageVersion } from '../utils/packageVersion';
import { ProjectsService } from '../services/projects.service';
import type { ProjectType } from 'nocodb-sdk';
@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 { 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';
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 { nocoExecute } from 'nc-help';
import papaparse from 'papaparse';
import { NcError } from '../../helpers/catchError';
import getAst from '../../helpers/getAst';
import { Base, Column, Model, View } from '../../models';
import NcConnectionMgrv2 from '../../utils/common/NcConnectionMgrv2';
import { serializeCellValue } from '../datas/helpers';
import { PublicDatasExportService } from './public-datas-export.service';
import type { LinkToAnotherRecordColumn, LookupColumn } from '../../models';
import { NcError } from '../helpers/catchError';
import getAst from '../helpers/getAst';
import { Base, Column, Model, View } from '../models';
import NcConnectionMgrv2 from '../utils/common/NcConnectionMgrv2';
import { serializeCellValue } from '../modules/datas/helpers';
import { PublicDatasExportService } from '../services/public-datas-export.service';
import type { LinkToAnotherRecordColumn, LookupColumn } from '../models';
@Controller()
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 { PublicDatasController } from './public-datas.controller';
import { PublicDatasService } from './public-datas.service';
import { PublicDatasService } from '../services/public-datas.service';
import type { TestingModule } from '@nestjs/testing';
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';
import { AnyFilesInterceptor } from '@nestjs/platform-express';
import multer from 'multer';
import { NC_ATTACHMENT_FIELD_SIZE } from '../../constants';
import { PublicDatasService } from './public-datas.service';
import { NC_ATTACHMENT_FIELD_SIZE } from '../constants';
import { PublicDatasService } from '../services/public-datas.service';
@Controller()
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 { PublicMetasController } from './public-metas.controller';
import { PublicMetasService } from './public-metas.service';
import { PublicMetasService } from '../services/public-metas.service';
import type { TestingModule } from '@nestjs/testing';
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 { PublicMetasService } from './public-metas.service';
import { PublicMetasService } from '../services/public-metas.service';
@Controller()
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 { SharedBasesController } from './shared-bases.controller';
import { SharedBasesService } from './shared-bases.service';
import { SharedBasesService } from '../services/shared-bases.service';
import type { TestingModule } from '@nestjs/testing';
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,
} from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { SharedBasesService } from './shared-bases.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { SharedBasesService } from '../services/shared-bases.service';
@Controller()
@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 { SortsController } from './sorts.controller';
import { SortsService } from './sorts.service';
import { SortsService } from '../services/sorts.service';
import type { TestingModule } from '@nestjs/testing';
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';
import { AuthGuard } from '@nestjs/passport';
import { SortReqType } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse';
import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../helpers/PagedResponse';
import {
ExtractProjectIdMiddleware,
UseAclMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { SortsService } from './sorts.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { SortsService } from '../services/sorts.service';
@Controller()
@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 { SyncController } from './sync.controller';
import { SyncService } from './sync.service';
import { SyncService } from '../services/sync.service';
import type { TestingModule } from '@nestjs/testing';
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,
UseGuards,
} from '@nestjs/common';
import { GlobalGuard } from '../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { SyncService } from './sync.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { SyncService } from '../services/sync.service';
@Controller()
@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 { TablesController } from './tables.controller';
import { TablesService } from './tables.service';
import { TablesService } from '../services/tables.service';
import type { TestingModule } from '@nestjs/testing';
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';
import { AuthGuard } from '@nestjs/passport';
import { TableReqType } from 'nocodb-sdk';
import { GlobalGuard } from '../../guards/global/global.guard';
import extractRolesObj from '../../utils/extractRolesObj';
import { PagedResponseImpl } from '../../helpers/PagedResponse';
import { GlobalGuard } from '../guards/global/global.guard';
import extractRolesObj from '../utils/extractRolesObj';
import { PagedResponseImpl } from '../helpers/PagedResponse';
import {
ExtractProjectIdMiddleware,
UseAclMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { TablesService } from './tables.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { TablesService } from '../services/tables.service';
@Controller()
@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 { UtilsController } from './utils.controller';
import { UtilsService } from './utils.service';
import { UtilsService } from '../services/utils.service';
import type { TestingModule } from '@nestjs/testing';
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,
UseGuards,
} from '@nestjs/common';
import { GlobalGuard } from '../../guards/global/global.guard';
import { GlobalGuard } from '../guards/global/global.guard';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { UtilsService } from './utils.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { UtilsService } from '../services/utils.service';
@Controller()
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 { ViewColumnsController } from './view-columns.controller';
import { ViewColumnsService } from './view-columns.service';
import { ViewColumnsService } from '../services/view-columns.service';
import type { TestingModule } from '@nestjs/testing';
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';
import { ColumnReqType, ViewColumnReqType } from 'nocodb-sdk';
import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard';
import { PagedResponseImpl } from '../../helpers/PagedResponse';
import { GlobalGuard } from '../guards/global/global.guard';
import { PagedResponseImpl } from '../helpers/PagedResponse';
import {
Acl,
ExtractProjectIdMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { ViewColumnsService } from './view-columns.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { ViewColumnsService } from '../services/view-columns.service';
@Controller()
@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 { ViewsController } from './views.controller';
import { ViewsService } from './views.service';
import { ViewsService } from '../services/views.service';
import type { TestingModule } from '@nestjs/testing';
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,
} from '@nestjs/common';
import { ViewUpdateReqType } from 'nocodb-sdk';
import { PagedResponseImpl } from '../../helpers/PagedResponse';
import { PagedResponseImpl } from '../helpers/PagedResponse';
import {
ExtractProjectIdMiddleware,
UseAclMiddleware,
} from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { GlobalGuard } from '../../guards/global/global.guard';
import { ViewsService } from './views.service';
} from '../middlewares/extract-project-id/extract-project-id.middleware';
import { GlobalGuard } from '../guards/global/global.guard';
import { ViewsService } from '../services/views.service';
@Controller()
@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 { NcError } from '../../helpers/catchError';
import { Model, Project } from '../../models';
import { NcError } from '../helpers/catchError';
import { Model, Project } from '../models';
import getSwaggerJSON from './swagger/getSwaggerJSON';
@Injectable()

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

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

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

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

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

@ -1,6 +1,6 @@
import { Module } from '@nestjs/common';
import { AuditsService } from './audits.service';
import { AuditsController } from './audits.controller';
import { AuditsService } from '../../services/audits.service';
import { AuditsController } from '../../controllers/audits.controller';
@Module({
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 { LocalStrategy } from '../../strategies/local.strategy';
import { UsersModule } from '../users/users.module';
import { AuthService } from './auth.service';
import { AuthController } from './auth.controller';
import { AuthService } from '../../services/auth.service';
import { AuthController } from '../../controllers/auth.controller';
@Module({
controllers: [AuthController],

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save