import APIHandler from './data/APIHandler'; import { getUserProfileId } from '../utils/Common'; //import { Environment } from '../utils/enums'; const profileURL = 'profile/api/profiles/'; // export async function getProfileData(environment?: string) { // const env = environment ? environment : Environment.PROD; // const profileID = await getUserProfileId(); // const response = await new APIHandler(env).get(`${profileURL}${profileID}`); // return response; // } export async function getProfileData() { const profileID = await getUserProfileId(); const response = await APIHandler.sharedInstance.get( `${profileURL}${profileID}` ); return response; } export async function updateProfileData(payload: any) { const profileID = await getUserProfileId(); const res = await APIHandler.sharedInstance.patch( `${profileURL}${profileID}`, payload ); return res; } // export async function updateProfileData(payload: any, environment?: string) { // const env = environment ? environment : Environment.PROD; // const profileID = await getUserProfileId(); // const res = await new APIHandler(env).patch( // `${profileURL}${profileID}`, // payload // ); // return res; // }