refactor
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { User } from '../../domain/entities/User';
|
||||
import { IUserRepository } from '../../domain/repositories/IUserRepository';
|
||||
// No direct import of apps/api DTOs in core module
|
||||
|
||||
/**
|
||||
@@ -7,9 +8,13 @@ import { User } from '../../domain/entities/User';
|
||||
* Retrieves the current user session information.
|
||||
*/
|
||||
export class GetCurrentSessionUseCase {
|
||||
constructor(private userRepo: IUserRepository) {}
|
||||
|
||||
async execute(userId: string): Promise<User | null> {
|
||||
// TODO: Implement actual logic to retrieve user and session data
|
||||
console.warn('GetCurrentSessionUseCase: Method not implemented.');
|
||||
return null;
|
||||
const stored = await this.userRepo.findById(userId);
|
||||
if (!stored) {
|
||||
return null;
|
||||
}
|
||||
return User.fromStored(stored);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user