-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"mongoUri":"mongodb://127.0.0.1:39683/","mongoDBName":"jest"} | ||
{"mongoUri":"mongodb://127.0.0.1:42033/","mongoDBName":"jest"} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export * from './db-add-account' | ||
export * from './db-add-survey' | ||
export * from './db-authentication' | ||
export * from './db-load-account-by-token' | ||
export * from './db-load-survey-by-id' | ||
export * from './db-load-survey-result' | ||
export * from './db-load-surveys' | ||
export * from './db-save-survey-result' |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export * from './add-account' | ||
export * from './add-survey' | ||
export * from './authentication' | ||
export * from './load-account-by-token' | ||
export * from './load-survey-by-id' | ||
export * from './load-survey-result' | ||
export * from './load-surveys' | ||
export * from './save-survey-result' |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './bcrypter-adapter' | ||
export * from './jwt-adapter' |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export * from './account-mongo-repository' | ||
export * from './log-mongo-repository' | ||
export * from './mongo-helper' | ||
export * from './query-builder' | ||
export * from './survey-mongo-repository' | ||
export * from './survey-result-mongo-repository' |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export * from './add-survey-controller-factory' | ||
export * from './add-survey-validation-factory' | ||
export * from './load-survey-result-controller-factory' | ||
export * from './load-surveys-controller-factory' | ||
export * from './login-controller-factory' | ||
export * from './login-validation-factory' | ||
export * from './save-survey-result-controller-factory' | ||
export * from './signup-controller-factory' | ||
export * from './signup-validation-factory' |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { adaptMiddleware } from '@/main/adapters' | ||
import { makeAuthMiddleware } from './auth-middleware-factory' | ||
import { adaptMiddleware } from '@/main/adapters' | ||
|
||
export const adminAuth = adaptMiddleware(makeAuthMiddleware('admin')) |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { DbAddSurvey } from '@/data/usecases' | ||
import { AddSurvey } from '@/domain/usecases' | ||
import { SurveyMongoRepository } from '@/infra/db/mongodb' | ||
|
||
export const makeDbAddSurvey = (): AddSurvey => { | ||
const surveyMongoRepository = new SurveyMongoRepository() | ||
return new DbAddSurvey(surveyMongoRepository) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import env from '@/main/config/env' | ||
import { LoadAccountByToken } from '@/domain/usecases' | ||
import { AccountMongoRepository } from '@/infra/db/mongodb' | ||
import { DbLoadAccountByToken } from '@/data/usecases' | ||
import { JwtAdapter } from '@/infra/criptography' | ||
|
||
export const makeDbLoadAccountByToken = (): LoadAccountByToken => { | ||
const jwtAdapter = new JwtAdapter(env.jwtSecret) | ||
const accountMongoRepository = new AccountMongoRepository() | ||
return new DbLoadAccountByToken(jwtAdapter, accountMongoRepository) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { DbLoadSurveyById } from '@/data/usecases' | ||
import { LoadSurveyById } from '@/domain/usecases' | ||
import { SurveyMongoRepository } from '@/infra/db/mongodb' | ||
|
||
export const makeDbLoadSurveyById = (): LoadSurveyById => { | ||
const surveyMongoRepository = new SurveyMongoRepository() | ||
return new DbLoadSurveyById(surveyMongoRepository) | ||
} |