From d7060c8248f09e44a6bb8e7b884c0445ac306e30 Mon Sep 17 00:00:00 2001 From: Mahen Date: Tue, 24 Feb 2026 22:26:45 +0700 Subject: [PATCH] chore: update http method profile update endpoint --- src/app/api/profile/route.ts | 2 +- src/services/profile.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/api/profile/route.ts b/src/app/api/profile/route.ts index 83c776c..bb9070c 100644 --- a/src/app/api/profile/route.ts +++ b/src/app/api/profile/route.ts @@ -2,7 +2,7 @@ import { NextResponse } from "next/server"; import { userService } from "@/src/services/profile.service"; import { withAuth } from "@/lib/withAuth"; -export const POST = withAuth(async (req, _context, session) => { +export const PATCH = withAuth(async (req, _context, session) => { try { const email = session.user?.email as string; const body = await req.json(); diff --git a/src/services/profile.service.ts b/src/services/profile.service.ts index 354a54c..9a5c569 100644 --- a/src/services/profile.service.ts +++ b/src/services/profile.service.ts @@ -3,7 +3,7 @@ import { ProfileFormData } from "../types"; export const updateProfileService = async (formData: ProfileFormData) => { const response = await fetch("/api/profile", { - method: "POST", + method: "PATCH", body: JSON.stringify(formData), });