From f3a9ea9a4068690557d44b180d16417e564fc369 Mon Sep 17 00:00:00 2001 From: Sergiy Date: Thu, 26 Sep 2024 00:04:48 +0300 Subject: [PATCH] OV-404: + controller --- backend/src/bundles/templates/templates.ts | 12 ++++++++++++ .../common/server-application/server-application.ts | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 backend/src/bundles/templates/templates.ts diff --git a/backend/src/bundles/templates/templates.ts b/backend/src/bundles/templates/templates.ts new file mode 100644 index 000000000..38ddbeeb4 --- /dev/null +++ b/backend/src/bundles/templates/templates.ts @@ -0,0 +1,12 @@ +import { logger } from '~/common/logger/logger.js'; + +import { TemplateController } from './templates.controller.js'; +import { TemplateModel } from './templates.model.js'; +import { TemplateRepository } from './templates.repository.js'; +import { TemplateService } from './templates.service.js'; + +const templateRepository = new TemplateRepository(TemplateModel); +const templateService = new TemplateService(templateRepository); +const templateController = new TemplateController(logger, templateService); + +export { templateController }; diff --git a/backend/src/common/server-application/server-application.ts b/backend/src/common/server-application/server-application.ts index f940b4b54..feb24194d 100644 --- a/backend/src/common/server-application/server-application.ts +++ b/backend/src/common/server-application/server-application.ts @@ -4,6 +4,7 @@ import { avatarController } from '~/bundles/avatars/avatars.js'; import { chatController } from '~/bundles/chat/chat.js'; import { notificationController } from '~/bundles/notifications/notifications.js'; import { speechController } from '~/bundles/speech/speech.js'; +import { templateController } from '~/bundles/templates/templates.js'; import { userController } from '~/bundles/users/users.js'; import { videoController } from '~/bundles/videos/videos.js'; import { config } from '~/common/config/config.js'; @@ -24,6 +25,7 @@ const apiV1 = new BaseServerAppApi( ...chatController.routes, ...speechController.routes, ...avatarVideoController.routes, + ...templateController.routes, ); const serverApp = new BaseServerApp({