feature/refactor: smartfeeds to reduce the client complexity
This commit is contained in:
parent
46090d944a
commit
f6cd05beac
19 changed files with 782 additions and 800 deletions
|
|
@ -1,5 +1,10 @@
|
|||
const api = {
|
||||
fetch: async function (url, options = { method: "GET" }) {
|
||||
fetch: async function (url, __options) {
|
||||
const options = {
|
||||
method: "GET",
|
||||
...__options,
|
||||
};
|
||||
|
||||
const session_id = (document.cookie.match(
|
||||
/^(?:.*;)?\s*session_id\s*=\s*([^;]+)(?:.*)?$/,
|
||||
) || [, null])[1];
|
||||
|
|
@ -19,6 +24,7 @@ const api = {
|
|||
const fetch_options = {
|
||||
method: options.method,
|
||||
headers,
|
||||
signal: options.signal,
|
||||
};
|
||||
|
||||
if (options.json) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue