website refactor
This commit is contained in:
@@ -5,7 +5,7 @@ import { PasswordHash } from '../value-objects/PasswordHash';
|
||||
*
|
||||
* Service for password hashing and verification.
|
||||
*/
|
||||
export interface IPasswordHashingService {
|
||||
export interface PasswordHashingService {
|
||||
hash(plain: string): Promise<string>;
|
||||
verify(plain: string, hash: string): Promise<boolean>;
|
||||
}
|
||||
@@ -13,7 +13,7 @@ export interface IPasswordHashingService {
|
||||
/**
|
||||
* Implementation using bcrypt via PasswordHash VO.
|
||||
*/
|
||||
export class PasswordHashingService implements IPasswordHashingService {
|
||||
export class PasswordHashingService implements PasswordHashingService {
|
||||
async hash(plain: string): Promise<string> {
|
||||
const passwordHash = await PasswordHash.create(plain);
|
||||
return passwordHash.value;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
||||
import { RatingUpdateService } from './RatingUpdateService';
|
||||
import type { IUserRatingRepository } from '../repositories/IUserRatingRepository';
|
||||
import type { IRatingEventRepository } from '../repositories/IRatingEventRepository';
|
||||
import type { UserRatingRepository } from '../repositories/UserRatingRepository';
|
||||
import type { RatingEventRepository } from '../repositories/RatingEventRepository';
|
||||
import { UserRating } from '../value-objects/UserRating';
|
||||
import { RatingEvent } from '../entities/RatingEvent';
|
||||
import { RatingEventId } from '../value-objects/RatingEventId';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { IDomainService } from '@core/shared/domain';
|
||||
import type { IUserRatingRepository } from '../repositories/IUserRatingRepository';
|
||||
import type { IRatingEventRepository } from '../repositories/IRatingEventRepository';
|
||||
import type { DomainService } from '@core/shared/domain';
|
||||
import type { UserRatingRepository } from '../repositories/UserRatingRepository';
|
||||
import type { RatingEventRepository } from '../repositories/RatingEventRepository';
|
||||
import { RatingEventFactory } from './RatingEventFactory';
|
||||
import { RatingSnapshotCalculator } from './RatingSnapshotCalculator';
|
||||
import { RatingEvent } from '../entities/RatingEvent';
|
||||
@@ -17,7 +17,7 @@ import { RatingDelta } from '../value-objects/RatingDelta';
|
||||
* EVOLVED (Slice 7): Now uses event-driven approach with ledger pattern.
|
||||
* Records rating events and recomputes snapshots for transparency and auditability.
|
||||
*/
|
||||
export class RatingUpdateService implements IDomainService {
|
||||
export class RatingUpdateService implements DomainService {
|
||||
readonly serviceName = 'RatingUpdateService';
|
||||
|
||||
constructor(
|
||||
|
||||
Reference in New Issue
Block a user