Skip to content

Commit

Permalink
fix: fixed settings import default error
Browse files Browse the repository at this point in the history
  • Loading branch information
theblockstalk committed Jul 7, 2024
1 parent 2f97a77 commit d4c020c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/accounts/accounts.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export class AccountsController {
response.status(HttpStatus.CREATED).send(val);
} catch (e) {
if (e instanceof HttpException) throw e;
console.log(e);
console.log('Error Detail', JSON.stringify(e, null, 2));
this.logger.error(e);
throw new HttpException(e.message, HttpStatus.INTERNAL_SERVER_ERROR);
Expand Down
17 changes: 9 additions & 8 deletions src/settings.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as configDefault from './config/config';
import * as configStaging from './config/config.staging';
import * as configTestnet from './config/config.testnet';
import * as configProduction from './config/config.production';
import configDefault from './config/config';
import configStaging from './config/config.staging';
import configTestnet from './config/config.testnet';
import configProduction from './config/config.production';

const env = process.env.NODE_ENV || 'development';

Expand Down Expand Up @@ -52,16 +52,17 @@ switch (env) {
case 'test':
case 'local':
case 'development':
config = configDefault as any;
config = configDefault as FixLoggerLevelEnumType<typeof configDefault>;
break;
case 'staging':
config = configStaging as any;
config = configStaging as FixLoggerLevelEnumType<typeof configDefault>;
break;
case 'testnet':
config = configTestnet as any;
config = configTestnet as FixLoggerLevelEnumType<typeof configDefault>;
break;
case 'production':
config = configProduction as any;
config = configProduction as FixLoggerLevelEnumType<typeof configDefault>;
break;
default:
throw new Error('Unknown environment: ' + env);
}
Expand Down

0 comments on commit d4c020c

Please sign in to comment.