mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
fix(error-handler): i18n
This commit is contained in:
parent
571c1b8a0d
commit
f08cb779e0
@ -12,8 +12,6 @@ import { BaseError } from '@nocobase/database';
|
||||
import { Plugin } from '@nocobase/server';
|
||||
import lodash from 'lodash';
|
||||
import { ErrorHandler } from './error-handler';
|
||||
import enUS from './locale/en-US.json';
|
||||
import zhCN from './locale/zh-CN.json';
|
||||
|
||||
export class PluginErrorHandlerServer extends Plugin {
|
||||
errorHandler: ErrorHandler = new ErrorHandler();
|
||||
@ -67,8 +65,6 @@ export class PluginErrorHandlerServer extends Plugin {
|
||||
}
|
||||
|
||||
async load() {
|
||||
this.app.i18n.addResources('zh-CN', this.i18nNs, zhCN);
|
||||
this.app.i18n.addResources('en-US', this.i18nNs, enUS);
|
||||
this.app.use(this.errorHandler.middleware(), { before: 'cors', tag: 'errorHandler' });
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user