-
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.
fix(user registration): resolve registration bug
- ensure that a user provide neccessary inputs - restructure user entity - refactor other codes depending on user registration logic [Fixes #39]
- Loading branch information
Showing
18 changed files
with
240 additions
and
206 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
PORT= ******************************** | ||
APP_ENV= ******************************** | ||
PDN_DB_NAME= ***************************** | ||
|
||
TEST_DB_HOST= ******************************** | ||
TEST_DB_PORT= ******************************** | ||
TEST_DB_USER= ******************************** | ||
TEST_DB_PASS= ******************************** | ||
TEST_DB_NAME= ******************************** | ||
|
||
DEV_DB_HOST= ******************************** | ||
DEV_DB_PORT= ******************************** | ||
DEV_DB_USER= ******************************** | ||
DEV_DB_PASS= ***************************** | ||
DEV_DB_TYPE= ******************************* | ||
DEV_DB_NAME= ******************************* | ||
|
||
PDN_DB_HOST= ******************************** | ||
PDN_DB_PORT= ******************************** | ||
PDN_DB_USER= ******************************** | ||
PDN_DB_PASS= ******************************** | ||
PDN_DB_PASS= ******************************** | ||
PDN_DB_NAME= ***************************** |
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
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
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,24 +1,39 @@ | ||
module.exports = { | ||
"type": "postgres", | ||
"host": `${process.env.DEV_DB_HOST}`, | ||
"port": `${process.env.DEV_DB_PORT}`, | ||
"username": `${process.env.DEV_DB_USER}`, | ||
"password": `${process.env.DEV_DB_PASS}`, | ||
"database": `${process.env.DEV_DB_NAME}`, | ||
"synchronize": true, | ||
"logging": false, | ||
"entities": [ | ||
"src/entities/**/*.ts" | ||
], | ||
"migrations": [ | ||
"src/migrations/**/*.ts" | ||
], | ||
"subscribers": [ | ||
"src/subscribers/**/*.ts" | ||
], | ||
"cli": { | ||
"entitiesDir": "src/entities", | ||
"migrationsDir": "src/migrations", | ||
"subscribersDir": "src/subscribers" | ||
} | ||
}; | ||
const devConfig = { | ||
type: 'postgres', | ||
host: process.env.DEV_DB_HOST, | ||
port: process.env.DEV_DB_PORT, | ||
username: process.env.DEV_DB_USER, | ||
password: process.env.DEV_DB_PASS, | ||
database: process.env.DEV_DB_NAME, | ||
synchronize: true, | ||
logging: false, | ||
entities: ['src/entities/**/*.ts'], | ||
migrations: ['src/migrations/**/*.ts'], | ||
subscribers: ['src/subscribers/**/*.ts'], | ||
cli: { | ||
entitiesDir: 'src/entities', | ||
migrationsDir: 'src/migrations', | ||
subscribersDir: 'src/subscribers', | ||
}, | ||
}; | ||
|
||
const testConfig = { | ||
type: 'postgres', | ||
host: process.env.TEST_DB_HOST, | ||
port: process.env.TEST_DB_PORT, | ||
username: process.env.TEST_DB_USER, | ||
password: process.env.TEST_DB_PASS, | ||
database: process.env.TEST_DB_NAME, | ||
synchronize: true, | ||
logging: false, | ||
entities: ['src/entities/**/*.ts'], | ||
migrations: ['src/migrations/**/*.ts'], | ||
subscribers: ['src/subscribers/**/*.ts'], | ||
cli: { | ||
entitiesDir: 'src/entities', | ||
migrationsDir: 'src/migrations', | ||
subscribersDir: 'src/subscribers', | ||
}, | ||
}; | ||
|
||
module.exports = process.env.NODE_ENV === 'test' ? testConfig : devConfig; |
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
Oops, something went wrong.