update watchlist
This commit is contained in:
@@ -35,8 +35,7 @@ export const useFollowingEvents = () => {
|
|||||||
const base = getApiBase();
|
const base = getApiBase();
|
||||||
const resp = await fetch(base + '/api/account/events/following', {
|
const resp = await fetch(base + '/api/account/events/following', {
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
cache: 'no-store',
|
cache: 'no-store'
|
||||||
headers: { 'Cache-Control': 'no-cache' }
|
|
||||||
});
|
});
|
||||||
if (resp.ok) {
|
if (resp.ok) {
|
||||||
const data = await resp.json();
|
const data = await resp.json();
|
||||||
|
|||||||
@@ -63,8 +63,7 @@ export const useWatchlist = () => {
|
|||||||
const base = getApiBase();
|
const base = getApiBase();
|
||||||
const resp = await fetch(base + '/api/account/watchlist/realtime', {
|
const resp = await fetch(base + '/api/account/watchlist/realtime', {
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
cache: 'no-store',
|
cache: 'no-store'
|
||||||
headers: { 'Cache-Control': 'no-cache' }
|
|
||||||
});
|
});
|
||||||
if (resp.ok) {
|
if (resp.ok) {
|
||||||
const data = await resp.json();
|
const data = await resp.json();
|
||||||
|
|||||||
@@ -96,8 +96,7 @@ const CompanyIndex = () => {
|
|||||||
const base = getApiBase();
|
const base = getApiBase();
|
||||||
const resp = await fetch(base + '/api/account/watchlist', {
|
const resp = await fetch(base + '/api/account/watchlist', {
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
cache: 'no-store',
|
cache: 'no-store'
|
||||||
headers: { 'Cache-Control': 'no-cache' }
|
|
||||||
});
|
});
|
||||||
if (!resp.ok) {
|
if (!resp.ok) {
|
||||||
setIsInWatchlist(false);
|
setIsInWatchlist(false);
|
||||||
|
|||||||
@@ -101,9 +101,9 @@ export default function CenterDashboard() {
|
|||||||
const ts = Date.now();
|
const ts = Date.now();
|
||||||
|
|
||||||
const [w, e, c] = await Promise.all([
|
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/watchlist?_=${ts}`, { credentials: 'include', cache: 'no-store' }),
|
||||||
fetch(base + `/api/account/events/following?_=${ts}`, { credentials: 'include', cache: 'no-store', headers: { 'Cache-Control': 'no-cache' } }),
|
fetch(base + `/api/account/events/following?_=${ts}`, { credentials: 'include', cache: 'no-store' }),
|
||||||
fetch(base + `/api/account/events/posts?_=${ts}`, { credentials: 'include', cache: 'no-store', headers: { 'Cache-Control': 'no-cache' } }),
|
fetch(base + `/api/account/events/posts?_=${ts}`, { credentials: 'include', cache: 'no-store' }),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const jw = await w.json();
|
const jw = await w.json();
|
||||||
@@ -154,8 +154,7 @@ export default function CenterDashboard() {
|
|||||||
const base = getApiBase();
|
const base = getApiBase();
|
||||||
const response = await fetch(base + '/api/account/watchlist/realtime', {
|
const response = await fetch(base + '/api/account/watchlist/realtime', {
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
cache: 'no-store',
|
cache: 'no-store'
|
||||||
headers: { 'Cache-Control': 'no-cache' }
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user