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,20 @@
'use server';
import { revalidatePath } from 'next/cache';
import { Result } from '@/lib/contracts/Result';
import { routes } from '@/lib/routing/RouteConfig';
import { UpdateDriverProfileMutation } from '@/lib/mutations/drivers/UpdateDriverProfileMutation';
export async function updateProfileAction(
updates: { bio?: string; country?: string },
): Promise<Result<void, string>> {
const mutation = new UpdateDriverProfileMutation();
const result = await mutation.execute({ bio: updates.bio, country: updates.country });
if (result.isErr()) {
return Result.err(result.getError());
}
revalidatePath(routes.protected.profile);
return Result.ok(undefined);
}