mirror of
https://github.com/yusufipk/RepoHub.git
synced 2026-09-11 10:36:07 +00:00
fix: ensure support status API is always dynamic by disabling caching
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
import { NextResponse } from 'next/server'
|
import { NextResponse } from 'next/server'
|
||||||
|
|
||||||
|
export const dynamic = 'force-dynamic'
|
||||||
|
|
||||||
const CRYPTOMUS_ENABLED = process.env.CRYPTOMUS_ENABLED !== 'false'
|
const CRYPTOMUS_ENABLED = process.env.CRYPTOMUS_ENABLED !== 'false'
|
||||||
|
|
||||||
export async function GET() {
|
export async function GET() {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export function Header() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const checkCryptomusStatus = async () => {
|
const checkCryptomusStatus = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/api/support/status')
|
const response = await fetch('/api/support/status', { cache: 'no-store' })
|
||||||
const data = await response.json()
|
const data = await response.json()
|
||||||
setCryptomusEnabled(data.cryptomus_enabled)
|
setCryptomusEnabled(data.cryptomus_enabled)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user