refactor: Update fetch requests to disable caching for video data retrieval

This commit is contained in:
Yusuf İpek
2026-02-07 18:41:07 +03:00
parent 46d4e0c7d7
commit f8afec0291
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -188,7 +188,7 @@ export default function WatchPage() {
useEffect(() => {
async function fetchVideo() {
try {
const res = await fetch(`/api/watch/${videoId}`);
const res = await fetch(`/api/watch/${videoId}`, { cache: 'no-store' });
if (!res.ok) {
setError('Video not found or access denied');
setLoading(false);
@@ -1140,7 +1140,7 @@ export default function WatchPage() {
try {
if (isMutatingRef.current) return;
const res = await fetch(`/api/watch/${videoId}`);
const res = await fetch(`/api/watch/${videoId}`, { cache: 'no-store' });
if (res.ok) {
const data = await res.json();
if (!isMutatingRef.current) {