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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user