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: {
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
},
|
2021-07-05 12:33:24 +03:00
|
|
|
body: JSON.stringify(info),
|
2021-07-03 17:37:30 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
return response;
|
|
|
|
};
|