website refactor

This commit is contained in:
2026-01-14 02:02:24 +01:00
parent 8d7c709e0c
commit 4522d41aef
291 changed files with 12763 additions and 9309 deletions

View File

@@ -0,0 +1,26 @@
/**
* Forgot Password Mutation
*
* Framework-agnostic mutation for forgot password operations.
* Called from Server Actions.
*
* Pattern: Server Action → Mutation → Service → API Client
*/
import { Result } from '@/lib/contracts/Result';
import { AuthService } from '@/lib/services/auth/AuthService';
import { ForgotPasswordDTO } from '@/lib/types/generated/ForgotPasswordDTO';
import { ForgotPasswordResult } from '@/lib/mutations/auth/types/ForgotPasswordResult';
export class ForgotPasswordMutation {
async execute(params: ForgotPasswordDTO): Promise<Result<ForgotPasswordResult, string>> {
try {
const authService = new AuthService();
const result = await authService.forgotPassword(params);
return Result.ok(result);
} catch (error) {
const errorMessage = error instanceof Error ? error.message : 'Failed to send reset link';
return Result.err(errorMessage);
}
}
}