diff --git a/build.sh b/build.sh index ba0a603..15f902c 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,6 @@ #!/bin/bash +# nvm use --lts docker rmi iwa-api:latest rm -rf dist npm run build diff --git a/src/configs/app.config.ts b/src/configs/app.config.ts index 69a3537..60c2add 100644 --- a/src/configs/app.config.ts +++ b/src/configs/app.config.ts @@ -52,7 +52,7 @@ class AppConfig { private dbName: string = config.get('App.dbConfig.database') || 'iwa'; private dbUser: string = config.get('App.dbConfig.user') || 'iwa'; private dbPassword: string = config.get('App.dbConfig.password') || 'iwa'; - public mongoUrl: string = (config.util.getEnv() == "production" + public mongoUrl: string = (config.util.getEnv('NODE_ENV') == "production" ? `mongodb://${this.dbUser}:${this.dbPassword}@${this.dbHost}:${this.dbPort}/${this.dbName}?authSource=admin` : `mongodb://${this.dbHost}:${this.dbPort}/${this.dbName}` ); diff --git a/src/controllers/message.controller.ts b/src/controllers/message.controller.ts index 51f8160..dc38359 100644 --- a/src/controllers/message.controller.ts +++ b/src/controllers/message.controller.ts @@ -69,7 +69,8 @@ export class MessageController { user_id: req.body.user_id, text: req.body.text, is_read: false, - sent_date: new Date(Date.now()) + sent_date: new Date(Date.now()), + read_date: new Date(Date.now()) }; this.message_service.createMessage(message_params, (err: any, message_data: IMessage) => { if (err) { diff --git a/src/modules/users/model.ts b/src/modules/users/model.ts index 829dfd0..9fc304b 100644 --- a/src/modules/users/model.ts +++ b/src/modules/users/model.ts @@ -28,7 +28,6 @@ export interface IUser { last_name: String; }; email: String; - password: String; phone_number: String; address: { street: String; @@ -37,10 +36,7 @@ export interface IUser { zip: String; country: String; } - verify_code: String; is_enabled: Boolean; - password_reset: Boolean; - mfa_enabled: Boolean; is_admin: Boolean; is_deleted?: Boolean; modification_notes: ModificationNote[]