feature/refactor: smartfeeds to reduce the client complexity

This commit is contained in:
Andy Burke 2025-10-10 16:39:44 -07:00
parent 46090d944a
commit f6cd05beac
19 changed files with 782 additions and 800 deletions

View file

@ -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) {