3736 |
stevensc |
1 |
import { api } from '@api';
|
|
|
2 |
|
|
|
3 |
// Basic settings service
|
|
|
4 |
export const getBasicSettings = async () => {
|
|
|
5 |
return await api.get('/account-settings/basic');
|
|
|
6 |
};
|
|
|
7 |
|
|
|
8 |
export const updateBasicSettings = async (data) => {
|
|
|
9 |
return await api.post('/account-settings/basic', data);
|
|
|
10 |
};
|
|
|
11 |
|
|
|
12 |
// Notifications service
|
|
|
13 |
export const getNotificationSettings = async () => {
|
|
|
14 |
return await api.get('/account-settings/notifications');
|
|
|
15 |
};
|
|
|
16 |
|
|
|
17 |
export const updateNotificationSettings = async (data) => {
|
|
|
18 |
return await api.post('/account-settings/notification', data);
|
|
|
19 |
};
|
|
|
20 |
|
|
|
21 |
// Location service
|
|
|
22 |
export const getLocationSettings = async () => {
|
|
|
23 |
return await api.get('/account-settings/location');
|
|
|
24 |
};
|
|
|
25 |
|
|
|
26 |
export const updateLocationSettings = async (data) => {
|
|
|
27 |
return await api.post('/account-settings/location', data);
|
|
|
28 |
};
|
|
|
29 |
|
|
|
30 |
// Privacy service
|
|
|
31 |
export const getPrivacySettings = async () => {
|
|
|
32 |
return await api.get('/account-settings/privacy');
|
|
|
33 |
};
|
|
|
34 |
|
|
|
35 |
export const updatePrivacySettings = async (data) => {
|
|
|
36 |
return await api.post('/account-settings/privacy', data);
|
|
|
37 |
};
|
|
|
38 |
|
|
|
39 |
// Password service
|
|
|
40 |
export const changePassword = async (data) => {
|
|
|
41 |
return await api.post('/account-settings/password', data);
|
|
|
42 |
};
|
|
|
43 |
|
|
|
44 |
// Image service
|
|
|
45 |
export const updateProfileImage = async (imageFile) => {
|
|
|
46 |
return await api.post('/account-settings/image', imageFile);
|
|
|
47 |
};
|
|
|
48 |
|
|
|
49 |
// Device and security services
|
|
|
50 |
export const getDevices = async () => {
|
|
|
51 |
return await api.get('/account-settings/devices');
|
|
|
52 |
};
|
|
|
53 |
|
|
|
54 |
export const getBrowsers = async () => {
|
|
|
55 |
return await api.get('/account-settings/browsers');
|
|
|
56 |
};
|
|
|
57 |
|
|
|
58 |
export const getIPs = async () => {
|
|
|
59 |
return await api.get('/account-settings/ips');
|
|
|
60 |
};
|
|
|
61 |
|
|
|
62 |
export const getTransactions = async () => {
|
|
|
63 |
return await api.get('/account-settings/transactions');
|
|
|
64 |
};
|
|
|
65 |
|
|
|
66 |
// Close account service
|
|
|
67 |
export const closeAccount = async (data) => {
|
|
|
68 |
return await api.post('/account-settings/close-account', data);
|
|
|
69 |
};
|