▲
Size: a a a
▲
▲
IV
кастом-сервер
, я в плане, может там какая-то сложная логика накручена▲
кастом-сервер
, я в плане, может там какая-то сложная логика накрученаБ
let _dataCache = {};
export default async function myFetcher(path, opts, ctx = null) {
const url = new URL(`${API_URL}${path}`);
const cacheKey = url.toString();
if (!_dataCache[cacheKey]) {
_dataCache[cacheKey] = await fetch(`${url}`, {
method: 'POST',
credentials: 'same-origin',
...opts,
headers
})
.then(r => r.json())
.then(data => data);
}
const data = _dataCache[cacheKey];
L
let _dataCache = {};
export default async function myFetcher(path, opts, ctx = null) {
const url = new URL(`${API_URL}${path}`);
const cacheKey = url.toString();
if (!_dataCache[cacheKey]) {
_dataCache[cacheKey] = await fetch(`${url}`, {
method: 'POST',
credentials: 'same-origin',
...opts,
headers
})
.then(r => r.json())
.then(data => data);
}
const data = _dataCache[cacheKey];
Б
L
L
Б
Б
L
Б
Б
M
🦜
M
🦜
🦜