website refactor

This commit is contained in:
2026-01-17 15:46:55 +01:00
parent 4d5ce9bfd6
commit 72a626ce71
346 changed files with 19308 additions and 8605 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);
}