mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 04:46:02 +00:00
fix(plugin-data-source-main): fix changed api
This commit is contained in:
parent
b61895d309
commit
288823dab1
@ -41,7 +41,7 @@ export class PluginDataSourceMainServer extends Plugin {
|
||||
this.loadFilter = filter;
|
||||
}
|
||||
|
||||
async onSync(message) {
|
||||
async handleSyncMessage(message) {
|
||||
const { type, collectionName } = message;
|
||||
if (type === 'newCollection') {
|
||||
const collectionModel: CollectionModel = await this.app.db.getCollection('collections').repository.findOne({
|
||||
@ -92,7 +92,7 @@ export class PluginDataSourceMainServer extends Plugin {
|
||||
transaction,
|
||||
});
|
||||
|
||||
this.app.syncManager.publish(this.name, {
|
||||
this.sendSyncMessage({
|
||||
type: 'newCollection',
|
||||
collectionName: model.get('name'),
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user