refactor: hook naming

This commit is contained in:
cha0s 2020-12-05 22:16:03 -06:00
parent 8d7cfa559b
commit bcd0ff26fa
2 changed files with 2 additions and 2 deletions

View File

@ -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());

View File

@ -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),
}), }),