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 09:56:52 +08:00
|
|
|
const hooks = this.get('x-server-hooks') || {};
|
2022-02-08 20:58:57 +08:00
|
|
|
return hooks[type] || [];
|
|
|
|
}
|
2022-01-19 10:09:30 +08:00
|
|
|
}
|
2022-02-08 20:58:57 +08:00
|
|
|
|
|
|
|
export { UiSchemaModel };
|