Skip to content
Snippets Groups Projects
Commit e9f8ee6e authored by donghyun's avatar donghyun
Browse files

refactor(auth): config로 의존성 주입 빼기

parent 0e80ae20
No related branches found
No related tags found
No related merge requests found
const db = require("./common/database");
const jwtController = require('./common/jwt/jwt.controller');
const AuthRepository = require('./repositories/auth.repository');
const AuthService = require('./auth.service');
const AuthController = require('./auth.controller');
const authRepository = new AuthRepository(db);
const authService = new AuthService(authRepository, jwtController);
const authController = new AuthController(authService);
module.exports = {
authRepository,
authService,
authController,
};
\ No newline at end of file
const express = require('express'); const express = require('express');
const AuthController = require('./auth.controller'); const { authController } = require('./config');
const AuthService = require('./auth.service');
const AuthRepository = require('./../../repositories/auth.repository');
const db = require("../../common/database");
const jwtController = require('./../../common/jwt/jwt.controller');
const authRepository = new AuthRepository(db);
const authService = new AuthService(authRepository, jwtController);
const authController = new AuthController(authService);
const authRouter = express.Router(); const authRouter = express.Router();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment