|
|
@ -1,46 +1,46 @@ |
|
|
|
import { Tele } from 'nc-help'; |
|
|
|
import { Tele } from 'nc-help'; |
|
|
|
import orgLicenseApis from '../../controllers/orgLicenseController'; |
|
|
|
import orgLicenseController from '../../controllers/orgLicenseController'; |
|
|
|
import orgTokenApis from '../../controllers/orgTokenController'; |
|
|
|
import orgTokenController from '../../controllers/orgTokenController'; |
|
|
|
import orgUserApis from '../../controllers/orgUserController'; |
|
|
|
import orgUserController from '../../controllers/orgUserController'; |
|
|
|
import projectApis from '../../controllers/projectController'; |
|
|
|
import projectController from '../../controllers/projectController'; |
|
|
|
import baseApis from '../../controllers/baseController'; |
|
|
|
import baseController from '../../controllers/baseController'; |
|
|
|
import tableApis from '../../controllers/tableController'; |
|
|
|
import tableController from '../../controllers/tableController'; |
|
|
|
import columnApis from '../../controllers/columnController'; |
|
|
|
import columnController from '../../controllers/columnController'; |
|
|
|
import { Router } from 'express'; |
|
|
|
import { Router } from 'express'; |
|
|
|
import sortApis from '../../controllers/sortController'; |
|
|
|
import sortController from '../../controllers/sortController'; |
|
|
|
import filterApis from '../../controllers/filterController'; |
|
|
|
import filterController from '../../controllers/filterController'; |
|
|
|
import viewColumnApis from '../../controllers/viewColumnController'; |
|
|
|
import viewColumnController from '../../controllers/viewColumnController'; |
|
|
|
import gridViewApis from '../../controllers/gridViewController'; |
|
|
|
import gridViewController from '../../controllers/gridViewController'; |
|
|
|
import viewApis from '../../controllers/viewController'; |
|
|
|
import viewController from '../../controllers/viewController'; |
|
|
|
import galleryViewApis from '../../controllers/galleryViewController'; |
|
|
|
import galleryViewController from '../../controllers/galleryViewController'; |
|
|
|
import formViewApis from '../../controllers/formViewController'; |
|
|
|
import formViewController from '../../controllers/formViewController'; |
|
|
|
import formViewColumnApis from '../../controllers/formViewColumnController'; |
|
|
|
import formViewColumnController from '../../controllers/formViewColumnController'; |
|
|
|
import attachmentApis from '../../controllers/attachmentController'; |
|
|
|
import attachmentController from '../../controllers/attachmentController'; |
|
|
|
import exportApis from '../../controllers/exportController'; |
|
|
|
import exportController from '../../controllers/exportController'; |
|
|
|
import auditApis from '../../controllers/auditController'; |
|
|
|
import auditController from '../../controllers/auditController'; |
|
|
|
import hookApis from '../../controllers/hookController'; |
|
|
|
import hookController from '../../controllers/hookController'; |
|
|
|
import pluginApis from '../../controllers/pluginController'; |
|
|
|
import pluginController from '../../controllers/pluginController'; |
|
|
|
import gridViewColumnApis from '../../controllers/gridViewColumnController'; |
|
|
|
import gridViewColumnController from '../../controllers/gridViewColumnController'; |
|
|
|
import kanbanViewApis from '../../controllers/kanbanViewController'; |
|
|
|
import kanbanViewController from '../../controllers/kanbanViewController'; |
|
|
|
import { userController } from '../../controllers/userController'; |
|
|
|
import { userController } from '../../controllers/userController'; |
|
|
|
// import extractProjectIdAndAuthenticate from './helpers/extractProjectIdAndAuthenticate';
|
|
|
|
// import extractProjectIdAndAuthenticate from './helpers/extractProjectIdAndAuthenticate';
|
|
|
|
import utilApis from '../../controllers/utilController'; |
|
|
|
import utilController from '../../controllers/utilController'; |
|
|
|
import projectUserApis from '../../controllers/projectUserController'; |
|
|
|
import projectUserController from '../../controllers/projectUserController'; |
|
|
|
import sharedBaseApis from '../../controllers/sharedBaseController'; |
|
|
|
import sharedBaseController from '../../controllers/sharedBaseController'; |
|
|
|
import { initStrategies } from '../../controllers/userController/initStrategies'; |
|
|
|
import { initStrategies } from '../../controllers/userController/initStrategies'; |
|
|
|
import modelVisibilityApis from '../../controllers/modelVisibilityController'; |
|
|
|
import modelVisibilityController from '../../controllers/modelVisibilityController'; |
|
|
|
import metaDiffApis from '../../controllers/metaDiffController'; |
|
|
|
import metaDiffController from '../../controllers/metaDiffController'; |
|
|
|
import cacheApis from '../../controllers/cacheController'; |
|
|
|
import cacheController from '../../controllers/cacheController'; |
|
|
|
import apiTokenApis from '../../controllers/apiTokenController'; |
|
|
|
import apiTokenController from '../../controllers/apiTokenController'; |
|
|
|
import hookFilterApis from '../../controllers/hookFilterController'; |
|
|
|
import hookFilterController from '../../controllers/hookFilterController'; |
|
|
|
import testApis from '../../controllers/testController'; |
|
|
|
import testController from '../../controllers/testController'; |
|
|
|
import { |
|
|
|
import { |
|
|
|
bulkDataAliasApis, |
|
|
|
bulkDataAliasController, |
|
|
|
dataAliasApis, |
|
|
|
dataAliasController, |
|
|
|
dataAliasExportApis, |
|
|
|
dataAliasExportController, |
|
|
|
dataAliasNestedApis, |
|
|
|
dataAliasNestedController, |
|
|
|
dataApis, |
|
|
|
dataController, |
|
|
|
oldDataApis, |
|
|
|
oldDataController, |
|
|
|
} from '../../controllers/dataApis'; |
|
|
|
} from '../../controllers/dataApis'; |
|
|
|
import { |
|
|
|
import { |
|
|
|
publicDataController, |
|
|
|
publicDataController, |
|
|
@ -51,62 +51,62 @@ import { Server, Socket } from 'socket.io'; |
|
|
|
import passport from 'passport'; |
|
|
|
import passport from 'passport'; |
|
|
|
|
|
|
|
|
|
|
|
import crypto from 'crypto'; |
|
|
|
import crypto from 'crypto'; |
|
|
|
import swaggerApis from '../../controllers/swaggerController'; |
|
|
|
import swaggerController from '../../controllers/swaggerController'; |
|
|
|
import importApis from '../../controllers/syncController/importApis'; |
|
|
|
import importController from '../../controllers/syncController/importApis'; |
|
|
|
import syncSourceApis from '../../controllers/syncController'; |
|
|
|
import syncSourceController from '../../controllers/syncController'; |
|
|
|
import mapViewApis from '../../controllers/mapViewController'; |
|
|
|
import mapViewController from '../../controllers/mapViewController'; |
|
|
|
|
|
|
|
|
|
|
|
const clients: { [id: string]: Socket } = {}; |
|
|
|
const clients: { [id: string]: Socket } = {}; |
|
|
|
const jobs: { [id: string]: { last_message: any } } = {}; |
|
|
|
const jobs: { [id: string]: { last_message: any } } = {}; |
|
|
|
|
|
|
|
|
|
|
|
export default function (router: Router, server) { |
|
|
|
export default function (router: Router, server) { |
|
|
|
initStrategies(router); |
|
|
|
initStrategies(router); |
|
|
|
projectApis(router); |
|
|
|
projectController(router); |
|
|
|
baseApis(router); |
|
|
|
baseController(router); |
|
|
|
utilApis(router); |
|
|
|
utilController(router); |
|
|
|
|
|
|
|
|
|
|
|
if (process.env['PLAYWRIGHT_TEST'] === 'true') { |
|
|
|
if (process.env['PLAYWRIGHT_TEST'] === 'true') { |
|
|
|
router.use(testApis); |
|
|
|
router.use(testController); |
|
|
|
} |
|
|
|
} |
|
|
|
router.use(columnApis); |
|
|
|
router.use(columnController); |
|
|
|
router.use(exportApis); |
|
|
|
router.use(exportController); |
|
|
|
router.use(dataApis); |
|
|
|
router.use(dataController); |
|
|
|
router.use(bulkDataAliasApis); |
|
|
|
router.use(bulkDataAliasController); |
|
|
|
router.use(dataAliasApis); |
|
|
|
router.use(dataAliasController); |
|
|
|
router.use(dataAliasNestedApis); |
|
|
|
router.use(dataAliasNestedController); |
|
|
|
router.use(dataAliasExportApis); |
|
|
|
router.use(dataAliasExportController); |
|
|
|
router.use(oldDataApis); |
|
|
|
router.use(oldDataController); |
|
|
|
router.use(sortApis); |
|
|
|
router.use(sortController); |
|
|
|
router.use(filterApis); |
|
|
|
router.use(filterController); |
|
|
|
router.use(viewColumnApis); |
|
|
|
router.use(viewColumnController); |
|
|
|
router.use(gridViewApis); |
|
|
|
router.use(gridViewController); |
|
|
|
router.use(formViewColumnApis); |
|
|
|
router.use(formViewColumnController); |
|
|
|
router.use(publicDataController); |
|
|
|
router.use(publicDataController); |
|
|
|
router.use(publicDataExportController); |
|
|
|
router.use(publicDataExportController); |
|
|
|
router.use(publicMetaController); |
|
|
|
router.use(publicMetaController); |
|
|
|
router.use(gridViewColumnApis); |
|
|
|
router.use(gridViewColumnController); |
|
|
|
router.use(tableApis); |
|
|
|
router.use(tableController); |
|
|
|
router.use(galleryViewApis); |
|
|
|
router.use(galleryViewController); |
|
|
|
router.use(formViewApis); |
|
|
|
router.use(formViewController); |
|
|
|
router.use(viewApis); |
|
|
|
router.use(viewController); |
|
|
|
router.use(attachmentApis); |
|
|
|
router.use(attachmentController); |
|
|
|
router.use(auditApis); |
|
|
|
router.use(auditController); |
|
|
|
router.use(hookApis); |
|
|
|
router.use(hookController); |
|
|
|
router.use(pluginApis); |
|
|
|
router.use(pluginController); |
|
|
|
router.use(projectUserApis); |
|
|
|
router.use(projectUserController); |
|
|
|
router.use(orgUserApis); |
|
|
|
router.use(orgUserController); |
|
|
|
router.use(orgTokenApis); |
|
|
|
router.use(orgTokenController); |
|
|
|
router.use(orgLicenseApis); |
|
|
|
router.use(orgLicenseController); |
|
|
|
router.use(sharedBaseApis); |
|
|
|
router.use(sharedBaseController); |
|
|
|
router.use(modelVisibilityApis); |
|
|
|
router.use(modelVisibilityController); |
|
|
|
router.use(metaDiffApis); |
|
|
|
router.use(metaDiffController); |
|
|
|
router.use(cacheApis); |
|
|
|
router.use(cacheController); |
|
|
|
router.use(apiTokenApis); |
|
|
|
router.use(apiTokenController); |
|
|
|
router.use(hookFilterApis); |
|
|
|
router.use(hookFilterController); |
|
|
|
router.use(swaggerApis); |
|
|
|
router.use(swaggerController); |
|
|
|
router.use(syncSourceApis); |
|
|
|
router.use(syncSourceController); |
|
|
|
router.use(kanbanViewApis); |
|
|
|
router.use(kanbanViewController); |
|
|
|
router.use(mapViewApis); |
|
|
|
router.use(mapViewController); |
|
|
|
|
|
|
|
|
|
|
|
userController(router); |
|
|
|
userController(router); |
|
|
|
|
|
|
|
|
|
|
@ -152,7 +152,7 @@ export default function (router: Router, server) { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
importApis(router, io, jobs); |
|
|
|
importController(router, io, jobs); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getHash(str) { |
|
|
|
function getHash(str) { |
|
|
|