2025-05-02 21:43:51 +00:00
|
|
|
import { ITransactionManager } from "@/core/common/infrastructure/database";
|
|
|
|
|
import { LogoutData } from "../../domain";
|
|
|
|
|
import { IAuthService } from "../../domain/services";
|
2025-02-15 21:30:12 +00:00
|
|
|
|
|
|
|
|
export class LogoutUseCase {
|
|
|
|
|
constructor(
|
|
|
|
|
private readonly authService: IAuthService,
|
|
|
|
|
private readonly transactionManager: ITransactionManager
|
|
|
|
|
) {}
|
|
|
|
|
|
|
|
|
|
public async execute(logoutData: LogoutData) {
|
|
|
|
|
return await this.transactionManager.complete(async (transaction) => {
|
|
|
|
|
return await this.authService.logoutUser(logoutData, transaction);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|