website refactor
This commit is contained in:
@@ -14,11 +14,17 @@ import { ConsoleErrorReporter } from '@/lib/infrastructure/logging/ConsoleErrorR
|
||||
import { getWebsiteApiBaseUrl } from '@/lib/config/apiBaseUrl';
|
||||
|
||||
// DTO types
|
||||
import type { HomeViewData } from '@/templates/HomeTemplate';
|
||||
import { Result } from '@/lib/contracts/Result';
|
||||
import type { Service } from '@/lib/contracts/services/Service';
|
||||
import type { HomeDataDTO } from '@/lib/types/dtos/HomeDataDTO';
|
||||
|
||||
export class HomeService {
|
||||
async getHomeData(): Promise<Result<HomeViewData, Error>> {
|
||||
/**
|
||||
* HomeService
|
||||
*
|
||||
* @server-safe
|
||||
*/
|
||||
export class HomeService implements Service {
|
||||
async getHomeData(): Promise<Result<HomeDataDTO, Error>> {
|
||||
try {
|
||||
// Manual wiring: construct dependencies explicitly
|
||||
const baseUrl = getWebsiteApiBaseUrl();
|
||||
|
||||
Reference in New Issue
Block a user