website refactor

This commit is contained in:
2026-01-14 10:51:05 +01:00
parent 4522d41aef
commit 0d89ad027e
291 changed files with 6887 additions and 3685 deletions

View File

@@ -0,0 +1,24 @@
/**
* Logout Mutation
*
* Framework-agnostic mutation for logout 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';
export class LogoutMutation {
async execute(): Promise<Result<void, string>> {
try {
const authService = new AuthService();
await authService.logout();
return Result.ok(undefined);
} catch (error) {
const errorMessage = error instanceof Error ? error.message : 'Logout failed';
return Result.err(errorMessage);
}
}
}