2021-07-02 16:02:47 +03:00
|
|
|
export const fetchProfile = async (link, index) => {
|
|
|
|
const response = await fetch(`${link}${index}`);
|
2021-06-28 17:57:28 +03:00
|
|
|
let data = await response.json();
|
|
|
|
|
|
|
|
return data;
|
|
|
|
};
|
2021-06-29 17:58:15 +03:00
|
|
|
|
|
|
|
export const fetchSkills = async (link) => {
|
|
|
|
const response = await fetch(link);
|
|
|
|
let data = await response.json();
|
|
|
|
|
|
|
|
return data;
|
|
|
|
};
|
2021-07-03 17:37:30 +03:00
|
|
|
|
|
|
|
export const fetchItemsForId = async (link, id) => {
|
|
|
|
const response = await fetch(`${link}${id}`);
|
|
|
|
let data = await response.json();
|
|
|
|
|
|
|
|
return data;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const fetchForm = async (link, info) => {
|
|
|
|
const response = await fetch(link, {
|
|
|
|
method: 'POST',
|
|
|
|
headers: {
|
2021-07-06 10:53:50 +03:00
|
|
|
'Content-Type': 'multipart/form-data',
|
2021-07-03 17:37:30 +03:00
|
|
|
},
|
2021-07-06 10:53:50 +03:00
|
|
|
body: info,
|
2021-07-03 17:37:30 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
return response;
|
|
|
|
};
|