2022-02-08 20:58:57 +08:00
|
|
|
import { MagicAttributeModel } from '@nocobase/database';
|
|
|
|
import { HookType } from './server-hooks';
|
2022-01-19 10:09:30 +08:00
|
|
|
|
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-01-19 10:09:30 +08:00
|
|
|
}
|
2022-02-08 20:58:57 +08:00
|
|
|
|
|
|
|
export { UiSchemaModel };
|