Files
message-inbox-web-frontend-sdk/apps/web/app/api/bff/me/profile/route.ts
T
2026-07-17 21:48:37 +05:30

17 lines
472 B
TypeScript

import { NextRequest, NextResponse } from "next/server";
import { getBackend } from "@/lib/backend";
export const dynamic = "force-dynamic";
export async function PATCH(req: NextRequest) {
const body = await req.json().catch(() => ({}));
const user = await getBackend().updateMe({
name: body.name,
title: body.title,
avatarColor: body.avatarColor,
avatarUrl: body.avatarUrl,
presence: body.presence,
});
return NextResponse.json({ user });
}