13
const response = await fetch('/ChatPage/StartMessages', {
method: 'POST',
headers: { "Accept": "application/json", "Content-Type": "application/json" },
body: JSON.stringify({})
}).then(response => {
if (response.ok == true) {
return response.json();
}
}).then(function (data) {
return data;
})
return response
}
Как мне вернуть результат из этой функции?