update watchlist

This commit is contained in:
2025-12-15 18:28:35 +08:00
parent affff859b0
commit 8221180200
4 changed files with 7 additions and 11 deletions

View File

@@ -35,8 +35,7 @@ export const useFollowingEvents = () => {
const base = getApiBase();
const resp = await fetch(base + '/api/account/events/following', {
credentials: 'include',
cache: 'no-store',
headers: { 'Cache-Control': 'no-cache' }
cache: 'no-store'
});
if (resp.ok) {
const data = await resp.json();

View File

@@ -63,8 +63,7 @@ export const useWatchlist = () => {
const base = getApiBase();
const resp = await fetch(base + '/api/account/watchlist/realtime', {
credentials: 'include',
cache: 'no-store',
headers: { 'Cache-Control': 'no-cache' }
cache: 'no-store'
});
if (resp.ok) {
const data = await resp.json();

View File

@@ -96,8 +96,7 @@ const CompanyIndex = () => {
const base = getApiBase();
const resp = await fetch(base + '/api/account/watchlist', {
credentials: 'include',
cache: 'no-store',
headers: { 'Cache-Control': 'no-cache' }
cache: 'no-store'
});
if (!resp.ok) {
setIsInWatchlist(false);

View File

@@ -101,9 +101,9 @@ export default function CenterDashboard() {
const ts = Date.now();
const [w, e, c] = await Promise.all([
fetch(base + `/api/account/watchlist?_=${ts}`, { credentials: 'include', cache: 'no-store', headers: { 'Cache-Control': 'no-cache' } }),
fetch(base + `/api/account/events/following?_=${ts}`, { credentials: 'include', cache: 'no-store', headers: { 'Cache-Control': 'no-cache' } }),
fetch(base + `/api/account/events/posts?_=${ts}`, { credentials: 'include', cache: 'no-store', headers: { 'Cache-Control': 'no-cache' } }),
fetch(base + `/api/account/watchlist?_=${ts}`, { credentials: 'include', cache: 'no-store' }),
fetch(base + `/api/account/events/following?_=${ts}`, { credentials: 'include', cache: 'no-store' }),
fetch(base + `/api/account/events/posts?_=${ts}`, { credentials: 'include', cache: 'no-store' }),
]);
const jw = await w.json();
@@ -154,8 +154,7 @@ export default function CenterDashboard() {
const base = getApiBase();
const response = await fetch(base + '/api/account/watchlist/realtime', {
credentials: 'include',
cache: 'no-store',
headers: { 'Cache-Control': 'no-cache' }
cache: 'no-store'
});
if (response.ok) {