Pass force=true on manual refresh to bypass server cache
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
87043ba6af
commit
5dd471c92c
1 changed files with 4 additions and 3 deletions
|
|
@ -36,10 +36,11 @@ export function AdminMonitor({ user }: { user: User }) {
|
|||
const [loading, setLoading] = useState(false)
|
||||
const [deploying, setDeploying] = useState<Set<string>>(new Set())
|
||||
|
||||
async function fetchStatus() {
|
||||
async function fetchStatus(force = false) {
|
||||
setLoading(true)
|
||||
try {
|
||||
const res = await fetch('/deploy/status', { credentials: 'include' })
|
||||
const url = force ? '/deploy/status?force=true' : '/deploy/status'
|
||||
const res = await fetch(url, { credentials: 'include' })
|
||||
if (res.ok) setStatuses(await res.json())
|
||||
} finally {
|
||||
setLoading(false)
|
||||
|
|
@ -127,7 +128,7 @@ export function AdminMonitor({ user }: { user: User }) {
|
|||
<div style={{ flex: 1, overflowY: 'auto', padding: '1.5rem 2rem' }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '1rem' }}>
|
||||
<h2 style={{ fontSize: '1rem', fontWeight: 600 }}>App Updates</h2>
|
||||
<button onClick={fetchStatus} disabled={loading} style={{
|
||||
<button onClick={() => fetchStatus(true)} disabled={loading} style={{
|
||||
background: 'var(--surface-2)', border: 'none', borderRadius: '6px',
|
||||
color: 'var(--text-muted)', padding: '0.4rem 1rem', fontSize: '0.8rem', cursor: 'pointer',
|
||||
}}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue