fix dependencies
This commit is contained in:
1 parent
1c47c8ce2c
commit
e5e02b553a
3 files changed
+7
-2
No files matched your search
@@ -17,7 +17,7 @@ import DiagnosticController from "../controllers/diagnosticController.js";
|
|||||||
|
|
||||||
export const initializeControllers = (services) => {
|
export const initializeControllers = (services) => {
|
||||||
const controllers = {};
|
const controllers = {};
|
||||||
const commonDependencies = createCommonDependencies(services.db, services.logger, services.errorService, services.stringService);
|
const commonDependencies = createCommonDependencies(services.db, services.errorService, services.logger, services.stringService);
|
||||||
|
|
||||||
controllers.authController = new AuthController(commonDependencies, {
|
controllers.authController = new AuthController(commonDependencies, {
|
||||||
settingsService: services.settingsService,
|
settingsService: services.settingsService,
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import pkg from "handlebars";
|
|||||||
const { compile } = pkg;
|
const { compile } = pkg;
|
||||||
import mjml2html from "mjml";
|
import mjml2html from "mjml";
|
||||||
import jwt from "jsonwebtoken";
|
import jwt from "jsonwebtoken";
|
||||||
|
import crypto from "crypto";
|
||||||
|
|
||||||
export const initializeServices = async (appSettings, settingsService) => {
|
export const initializeServices = async (appSettings, settingsService) => {
|
||||||
const translationService = new TranslationService(logger);
|
const translationService = new TranslationService(logger);
|
||||||
@@ -83,6 +84,7 @@ export const initializeServices = async (appSettings, settingsService) => {
|
|||||||
|
|
||||||
// Business services
|
// Business services
|
||||||
const userService = new UserService({
|
const userService = new UserService({
|
||||||
|
crypto,
|
||||||
db,
|
db,
|
||||||
emailService,
|
emailService,
|
||||||
settingsService,
|
settingsService,
|
||||||
@@ -90,6 +92,7 @@ export const initializeServices = async (appSettings, settingsService) => {
|
|||||||
stringService,
|
stringService,
|
||||||
jwt,
|
jwt,
|
||||||
errorService,
|
errorService,
|
||||||
|
jobQueue: superSimpleQueue,
|
||||||
});
|
});
|
||||||
const checkService = new CheckService({
|
const checkService = new CheckService({
|
||||||
db,
|
db,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ const SERVICE_NAME = "userService";
|
|||||||
class UserService {
|
class UserService {
|
||||||
static SERVICE_NAME = SERVICE_NAME;
|
static SERVICE_NAME = SERVICE_NAME;
|
||||||
|
|
||||||
constructor({ db, emailService, settingsService, logger, stringService, jwt, errorService }) {
|
constructor({ crypto, db, emailService, settingsService, logger, stringService, jwt, errorService, jobQueue }) {
|
||||||
this.db = db;
|
this.db = db;
|
||||||
this.emailService = emailService;
|
this.emailService = emailService;
|
||||||
this.settingsService = settingsService;
|
this.settingsService = settingsService;
|
||||||
@@ -11,6 +11,8 @@ class UserService {
|
|||||||
this.stringService = stringService;
|
this.stringService = stringService;
|
||||||
this.jwt = jwt;
|
this.jwt = jwt;
|
||||||
this.errorService = errorService;
|
this.errorService = errorService;
|
||||||
|
this.jobQueue = jobQueue;
|
||||||
|
this.crypto = crypto;
|
||||||
}
|
}
|
||||||
|
|
||||||
get serviceName() {
|
get serviceName() {
|
||||||
|
|||||||
Reference in new issue
Block a user