blob: d72a5fbdad26abf8dc3163de9cc9117ec6cf775d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
import axios from 'axios';
const apiClient = axios.create({
baseURL: 'http://localhost:5000',
});
export const getVerifiedUsers = async () => {
const response = await apiClient.get('/users/verified');
return response;
};
export const getUnverifiedUsers = async () => {
const response = await apiClient.get('/users/unverified');
return response;
};
export const updateUser = async (id, payload) => {
const response = await apiClient.patch(`/user/${id}`, payload);
return response;
};
export const deleteUser = async (id) => {
const response = await apiClient.delete(`/user/${id}`);
return response;
};
export const getUpdatingUsers = async () => {
const response = await apiClient.get(`/users/updating`);
return response;
};
export const sendMessage = async (payload) => {
const response = await apiClient.post('/messages', payload);
return response;
};
|