mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
fix: system repositories.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// Here we import all events.
|
||||
import 'subscribers/authentication';
|
||||
import 'subscribers/organization';
|
||||
import 'subscribers/inviteUser';
|
||||
import 'subscribers/manualJournals';
|
||||
import 'subscribers/expenses';
|
||||
import 'subscribers/bills';
|
||||
|
||||
@@ -21,10 +21,8 @@ export default async ({ expressApp }) => {
|
||||
objectionLoader({ knex });
|
||||
|
||||
// It returns the agenda instance because it's needed in the subsequent loaders
|
||||
const { agenda } = await dependencyInjectorLoader({
|
||||
mongoConnection,
|
||||
knex,
|
||||
});
|
||||
const { agenda } = await dependencyInjectorLoader({ mongoConnection, knex });
|
||||
|
||||
await jobsLoader({ agenda });
|
||||
Logger.info('[init] Jobs loaded');
|
||||
|
||||
|
||||
@@ -6,9 +6,12 @@ import {
|
||||
} from 'system/repositories';
|
||||
|
||||
export default () => {
|
||||
const knex = Container.get('knex');
|
||||
const cache = Container.get('cache');
|
||||
|
||||
return {
|
||||
systemUserRepository: Container.get(SystemUserRepository),
|
||||
subscriptionRepository: Container.get(SubscriptionRepository),
|
||||
tenantRepository: Container.get(TenantRepository),
|
||||
systemUserRepository: new SystemUserRepository(knex, cache),
|
||||
subscriptionRepository: new SubscriptionRepository(knex, cache),
|
||||
tenantRepository: new TenantRepository(knex, cache),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user