fixed code

This commit is contained in:
Hope87
2021-07-05 12:33:24 +03:00
parent 082ae23f49
commit e8b7fbb2f3
8 changed files with 39 additions and 232 deletions

View File

@ -2,8 +2,6 @@ export const fetchProfile = async (link, index) => {
const response = await fetch(`${link}${index}`);
let data = await response.json();
console.log('data ', data);
return data;
};
@ -24,10 +22,10 @@ export const fetchItemsForId = async (link, id) => {
export const fetchForm = async (link, info) => {
const response = await fetch(link, {
method: 'POST',
body: JSON.stringify(info),
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(info),
});
return response;