File: //home/arjun/projects/buyercall/buyercall/assets/vue/service/profileService.js
import BuyerGatewayMock from '../gateway/mockGateway';
import BuyerGateway from '../gateway/gateway';
import { serializeForm } from '../utils/util';
const updateProfileInfo = data => {
console.log(serializeForm(data));
return BuyerGateway.post('/profile/information', data);
};
const updateProfileSecurityInfo = data => {
console.log(data);
return BuyerGateway.post('/profile/security-information', data);
};
const updateProfile2FA = data => {
console.log(data);
return BuyerGateway.post('/profile/two-factor-authentication', data);
};
const updateProfileThemeSettings = data => {
console.log(data);
return BuyerGateway.post('/profile/theme-settings', data);
};
const getProfileInfo = () => BuyerGateway.get('/profile');
const getInAppNotificationSettings = () =>
BuyerGateway.get('/profile/in-app-notification-settings');
const updateInAppNotificationSettings = postdata =>
BuyerGateway.post('/profile/in-app-notification-settings', postdata);
const getEmailNotificationSettings = () =>
BuyerGateway.get('/profile/email-notification-settings');
const updateEmailNotificationSettings = postdata =>
BuyerGateway.post('/profile/email-notification-settings', postdata);
const getUserScheduleInfo = () => BuyerGateway.get('/agents/get-schedule');
const updateUserScheduleInfo = (userId, postData) =>
BuyerGateway.post(`/agents/update-schedule/${userId}`, postData);
export default {
getEmailNotificationSettings,
updateEmailNotificationSettings,
getInAppNotificationSettings,
updateInAppNotificationSettings,
updateProfileInfo,
updateProfileSecurityInfo,
updateProfile2FA,
updateProfileThemeSettings,
getProfileInfo,
getUserScheduleInfo,
updateUserScheduleInfo,
};