tachybase_todo/packages/plugin-ui-schema-storage/src/model.ts

14 lines
344 B
TypeScript
Raw Normal View History

2022-02-08 20:58:57 +08:00
import { MagicAttributeModel } from '@nocobase/database';
import { HookType } from './server-hooks';
2022-02-08 20:58:57 +08:00
class UiSchemaModel extends MagicAttributeModel {
getListenServerHooks(type: HookType) {
2022-02-09 20:24:25 +08:00
const hooks = this.get('x-server-hooks') || [];
return hooks.filter((hook) => {
hook.type = '';
});
2022-02-08 20:58:57 +08:00
}
}
2022-02-08 20:58:57 +08:00
export { UiSchemaModel };