diff --git a/packages/db/src/db.js b/packages/db/src/db.js index 552f574..da24a1e 100644 --- a/packages/db/src/db.js +++ b/packages/db/src/db.js @@ -48,7 +48,7 @@ export async function createDatabaseConnection(latus) { 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)); Object.entries(map).forEach(([, Model]) => Model.associate(map)); Object.entries(map).forEach(([, Model]) => Model.sync()); diff --git a/packages/user/src/local.js b/packages/user/src/local.js index c3f06da..fc30dda 100644 --- a/packages/user/src/local.js +++ b/packages/user/src/local.js @@ -45,7 +45,7 @@ export default { }, )); }, - '@latus/db/decorate': (Models) => ({ + '@latus/db/models.decorate': (Models) => ({ ...Models, User: LocalUser(Models.User), }),