website refactor
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
import { ContainerModule } from 'inversify';
|
||||
import { AuthService } from '../../services/auth/AuthService';
|
||||
import { SessionService } from '../../services/auth/SessionService';
|
||||
import { AuthApiClient } from '../../api/auth/AuthApiClient';
|
||||
|
||||
import {
|
||||
AUTH_SERVICE_TOKEN,
|
||||
SESSION_SERVICE_TOKEN,
|
||||
AUTH_API_CLIENT_TOKEN
|
||||
} from '../tokens';
|
||||
|
||||
export const AuthModule = new ContainerModule((options) => {
|
||||
@@ -14,10 +12,7 @@ export const AuthModule = new ContainerModule((options) => {
|
||||
|
||||
// Session Service
|
||||
bind<SessionService>(SESSION_SERVICE_TOKEN)
|
||||
.toDynamicValue((ctx) => {
|
||||
const authApiClient = ctx.get<AuthApiClient>(AUTH_API_CLIENT_TOKEN);
|
||||
return new SessionService(authApiClient);
|
||||
})
|
||||
.to(SessionService)
|
||||
.inSingletonScope();
|
||||
|
||||
// Auth Service - now creates its own dependencies
|
||||
|
||||
Reference in New Issue
Block a user