refactor: hook naming
This commit is contained in:
parent
8d7cfa559b
commit
bcd0ff26fa
|
@ -48,7 +48,7 @@ export async function createDatabaseConnection(latus) {
|
||||||
underscored: true,
|
underscored: true,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
const map = latus.invokeComposed('@latus/db/decorate', Models);
|
const map = latus.invokeComposed('@latus/db/models.decorate', Models);
|
||||||
debug('composed: %O', Object.keys(map));
|
debug('composed: %O', Object.keys(map));
|
||||||
Object.entries(map).forEach(([, Model]) => Model.associate(map));
|
Object.entries(map).forEach(([, Model]) => Model.associate(map));
|
||||||
Object.entries(map).forEach(([, Model]) => Model.sync());
|
Object.entries(map).forEach(([, Model]) => Model.sync());
|
||||||
|
|
|
@ -45,7 +45,7 @@ export default {
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
},
|
},
|
||||||
'@latus/db/decorate': (Models) => ({
|
'@latus/db/models.decorate': (Models) => ({
|
||||||
...Models,
|
...Models,
|
||||||
User: LocalUser(Models.User),
|
User: LocalUser(Models.User),
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user