Add support for Lottie stickers and enhance disk space API endpoint

- Introduced Lottie sticker component with placeholder handling in DiscordLogs.
- Expanded Discord message types in DiscordLogs component.
- Implemented disk space fetching in MediaRequestForm with visual indicator.
- Enhanced API for fetching Discord messages to include Lottie data for stickers.
- Added disk space API endpoint with authentication and authorization checks.
This commit is contained in:
2025-12-19 10:26:22 -05:00
parent 2cc07b6cc2
commit 95a59e9395
7 changed files with 509 additions and 55 deletions

View File

@@ -48,6 +48,11 @@ async function performAuth(Astro) {
clearTimeout(timeout);
if (res.status === 401) {
// Check if we even have a refresh token before attempting refresh
if (!cookieHeader.includes('refresh_token=')) {
return null;
}
// Try refresh with timeout
controller = new AbortController();
timeout = setTimeout(() => controller.abort(), 3000);
@@ -68,7 +73,12 @@ async function performAuth(Astro) {
clearTimeout(timeout);
if (!refreshRes.ok) {
console.error("Token refresh failed", refreshRes.status);
let errorDetail = '';
try {
const errorBody = await refreshRes.text();
errorDetail = ` - ${errorBody}`;
} catch {}
console.error(`[SSR] Token refresh failed ${refreshRes.status}${errorDetail}`);
return null;
}