-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
58 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import AuthController from './auth.controller'; | ||
|
||
export { AuthController }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import { Worker } from 'bullmq'; | ||
import { redisConfig } from './redisConfig'; | ||
import { queueRedisConfig } from './queueRedisConfig'; | ||
import { EMAIL_QUEUE_IDENTIFIER } from '../../types/email'; | ||
|
||
const EmailWorker = new Worker(EMAIL_QUEUE_IDENTIFIER, __dirname + '/email.processor.ts', { | ||
connection: redisConfig, | ||
export const EmailWorker = new Worker(EMAIL_QUEUE_IDENTIFIER, __dirname + '/email.processor.ts', { | ||
connection: queueRedisConfig, | ||
}); | ||
|
||
export default EmailWorker; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { EmailQueue } from './email.queue'; | ||
import { EmailWorker } from './email.worker'; | ||
|
||
export { EmailQueue, EmailWorker }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Redis from 'ioredis'; | ||
import logger from '../../core/logger'; | ||
import config from '../../core/config'; | ||
|
||
export const queueRedisConfig = new Redis({ | ||
port: config.emailService.queue.redisPort, | ||
host: config.emailService.queue.redisHost, | ||
maxRetriesPerRequest: null, | ||
}); | ||
|
||
queueRedisConfig.connect(() => { | ||
logger.info('Connected to queue redis.'); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import UserRepository from './user'; | ||
import ApiMetadataRepository from './apiMetadata'; | ||
|
||
export { UserRepository, ApiMetadataRepository }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import express from 'express'; | ||
import validate from '../../core/middlewares/validator'; | ||
import authValidation from '../../validations/auth.validation'; | ||
import authController from '../../controllers/auth.controller'; | ||
import { AuthController } from '../../controllers/'; | ||
|
||
const router = express.Router(); | ||
|
||
router.post('/register', validate(authValidation.register), authController.register); | ||
router.post('/login', validate(authValidation.login), authController.login); | ||
router.post('/register', validate(authValidation.register), AuthController.register); | ||
router.post('/login', validate(authValidation.login), AuthController.login); | ||
router.post('/logout'); | ||
router.get('/me', validate(authValidation.getMe), authController.getMe); | ||
router.get('/me', validate(authValidation.getMe), AuthController.getMe); | ||
router.post('/refresh-tokens'); | ||
|
||
export default router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import EmailService from './email.service'; | ||
import JwtService from './jwt.service'; | ||
|
||
export { EmailService, JwtService }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import ApiError from './ApiError'; | ||
import exclude from './exclude'; | ||
import include from './include'; | ||
import catchAsync from './catchAsync'; | ||
import filter from './filter'; | ||
import getKeys from './getKeys'; | ||
import { TupleUnion } from './TupleUnion'; | ||
|
||
export { ApiError, exclude, include, catchAsync, filter, getKeys, TupleUnion }; |