services refactor

This commit is contained in:
2025-12-17 22:17:02 +01:00
parent 26f7a2b6aa
commit 055a7f67b5
93 changed files with 7434 additions and 659 deletions

View File

@@ -1,6 +1,18 @@
import { TeamJoinRequestItemDto } from '../dtos';
import type { TeamJoinRequestItemDto } from '../dtos';
import { TeamJoinRequestViewModel } from '../view-models';
/**
* Team Join Request Presenter
* Transforms TeamJoinRequestItemDto to TeamJoinRequestViewModel
*/
export class TeamJoinRequestPresenter {
present(dto: TeamJoinRequestItemDto, currentUserId: string, isOwner: boolean): TeamJoinRequestViewModel {
return new TeamJoinRequestViewModel(dto, currentUserId, isOwner);
}
}
// Backward compatibility export (deprecated)
export const presentTeamJoinRequest = (dto: TeamJoinRequestItemDto, currentUserId: string, isOwner: boolean): TeamJoinRequestViewModel => {
return new TeamJoinRequestViewModel(dto, currentUserId, isOwner);
const presenter = new TeamJoinRequestPresenter();
return presenter.present(dto, currentUserId, isOwner);
};