chore: update http method profile update endpoint

This commit is contained in:
Mahen 2026-02-24 22:26:45 +07:00
parent 777e71dd4b
commit d7060c8248
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ import { NextResponse } from "next/server";
import { userService } from "@/src/services/profile.service"; import { userService } from "@/src/services/profile.service";
import { withAuth } from "@/lib/withAuth"; import { withAuth } from "@/lib/withAuth";
export const POST = withAuth(async (req, _context, session) => { export const PATCH = withAuth(async (req, _context, session) => {
try { try {
const email = session.user?.email as string; const email = session.user?.email as string;
const body = await req.json(); const body = await req.json();

View File

@ -3,7 +3,7 @@ import { ProfileFormData } from "../types";
export const updateProfileService = async (formData: ProfileFormData) => { export const updateProfileService = async (formData: ProfileFormData) => {
const response = await fetch("/api/profile", { const response = await fetch("/api/profile", {
method: "POST", method: "PATCH",
body: JSON.stringify(formData), body: JSON.stringify(formData),
}); });