import { apiRequestData } from "./http"; import { getDeviceFingerprint } from "../auth/deviceFingerprint"; import type { LoginResponse } from "./types"; const JSON_HEADERS = { "content-type": "application/json", }; export async function changePassword(payload: { oldPassword: string; newPassword: string }) { return apiRequestData("/api/auth/change-password", { method: "POST", headers: { ...JSON_HEADERS, "x-device-fingerprint": getDeviceFingerprint(), }, body: JSON.stringify(payload), }); }