website refactor
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { AdminVoteSessionRepository } from '../../domain/repositories/AdminVoteSessionRepository';
|
||||
import { RatingEventRepository } from '../../domain/repositories/RatingEventRepository';
|
||||
import { UserRatingRepository } from '../../domain/repositories/UserRatingRepository';
|
||||
import { AdminTrustRatingCalculator } from '../../domain/services/AdminTrustRatingCalculator';
|
||||
import { RatingSnapshotCalculator } from '../../domain/services/RatingSnapshotCalculator';
|
||||
import { RatingEventFactory } from '../../domain/services/RatingEventFactory';
|
||||
import { CloseAdminVoteSessionInput, CloseAdminVoteSessionOutput } from '../dtos/AdminVoteSessionDto';
|
||||
import { AdminVoteSession, AdminVoteOutcome } from '../../domain/entities/AdminVoteSession';
|
||||
|
||||
/**
|
||||
* Use Case: CloseAdminVoteSessionUseCase
|
||||
@@ -26,7 +26,6 @@ export class CloseAdminVoteSessionUseCase {
|
||||
private readonly adminVoteSessionRepository: AdminVoteSessionRepository,
|
||||
private readonly ratingEventRepository: RatingEventRepository,
|
||||
private readonly userRatingRepository: UserRatingRepository,
|
||||
private readonly appendRatingEventsUseCase: any, // Will be typed properly in integration
|
||||
) {}
|
||||
|
||||
async execute(input: CloseAdminVoteSessionInput): Promise<CloseAdminVoteSessionOutput> {
|
||||
@@ -117,7 +116,7 @@ export class CloseAdminVoteSessionUseCase {
|
||||
* Events are created for the admin being voted on
|
||||
* Per plans: no events are created for tie outcomes
|
||||
*/
|
||||
private async createRatingEvents(session: any, outcome: any): Promise<number> {
|
||||
private async createRatingEvents(session: AdminVoteSession, outcome: AdminVoteOutcome): Promise<number> {
|
||||
let eventsCreated = 0;
|
||||
|
||||
// Don't create events for tie outcomes
|
||||
|
||||
Reference in New Issue
Block a user