mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-09 23:49:27 +08:00
17 lines
469 B
TypeScript
17 lines
469 B
TypeScript
import path from 'path';
|
|
import { IPlugin } from '@nocobase/server';
|
|
import { afterCreate, afterUpdate, afterDestroy } from './hooks';
|
|
|
|
export default {
|
|
name: 'action-logs',
|
|
async load() {
|
|
const database = this.app.db;
|
|
database.import({
|
|
directory: path.resolve(__dirname, 'collections'),
|
|
});
|
|
database.on('afterCreate', afterCreate);
|
|
database.on('afterUpdate', afterUpdate);
|
|
database.on('afterDestroy', afterDestroy);
|
|
}
|
|
} as IPlugin;
|