mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 06:26:30 +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;
|
this.loadFilter = filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
async onSync(message) {
|
async handleSyncMessage(message) {
|
||||||
const { type, collectionName } = message;
|
const { type, collectionName } = message;
|
||||||
if (type === 'newCollection') {
|
if (type === 'newCollection') {
|
||||||
const collectionModel: CollectionModel = await this.app.db.getCollection('collections').repository.findOne({
|
const collectionModel: CollectionModel = await this.app.db.getCollection('collections').repository.findOne({
|
||||||
@ -92,7 +92,7 @@ export class PluginDataSourceMainServer extends Plugin {
|
|||||||
transaction,
|
transaction,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.app.syncManager.publish(this.name, {
|
this.sendSyncMessage({
|
||||||
type: 'newCollection',
|
type: 'newCollection',
|
||||||
collectionName: model.get('name'),
|
collectionName: model.get('name'),
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user