mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-12 12:39:05 -05:00
fix dependencies
This commit is contained in:
@@ -17,7 +17,7 @@ import DiagnosticController from "../controllers/diagnosticController.js";
|
||||
|
||||
export const initializeControllers = (services) => {
|
||||
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, {
|
||||
settingsService: services.settingsService,
|
||||
|
||||
@@ -33,6 +33,7 @@ import pkg from "handlebars";
|
||||
const { compile } = pkg;
|
||||
import mjml2html from "mjml";
|
||||
import jwt from "jsonwebtoken";
|
||||
import crypto from "crypto";
|
||||
|
||||
export const initializeServices = async (appSettings, settingsService) => {
|
||||
const translationService = new TranslationService(logger);
|
||||
@@ -83,6 +84,7 @@ export const initializeServices = async (appSettings, settingsService) => {
|
||||
|
||||
// Business services
|
||||
const userService = new UserService({
|
||||
crypto,
|
||||
db,
|
||||
emailService,
|
||||
settingsService,
|
||||
@@ -90,6 +92,7 @@ export const initializeServices = async (appSettings, settingsService) => {
|
||||
stringService,
|
||||
jwt,
|
||||
errorService,
|
||||
jobQueue: superSimpleQueue,
|
||||
});
|
||||
const checkService = new CheckService({
|
||||
db,
|
||||
|
||||
@@ -3,7 +3,7 @@ const SERVICE_NAME = "userService";
|
||||
class UserService {
|
||||
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.emailService = emailService;
|
||||
this.settingsService = settingsService;
|
||||
@@ -11,6 +11,8 @@ class UserService {
|
||||
this.stringService = stringService;
|
||||
this.jwt = jwt;
|
||||
this.errorService = errorService;
|
||||
this.jobQueue = jobQueue;
|
||||
this.crypto = crypto;
|
||||
}
|
||||
|
||||
get serviceName() {
|
||||
|
||||
Reference in New Issue
Block a user