add file storage, local and prod
This commit is contained in:
@@ -24,6 +24,10 @@ interface DiagnosticsResponse {
|
||||
ai: {
|
||||
configured: boolean;
|
||||
};
|
||||
storage: {
|
||||
configured: boolean;
|
||||
type: "local" | "remote";
|
||||
};
|
||||
overallStatus: StatusLevel;
|
||||
}
|
||||
|
||||
@@ -115,6 +119,10 @@ export async function GET(req: Request) {
|
||||
env.BETTER_AUTH_SECRET && env.GOOGLE_CLIENT_ID && env.GOOGLE_CLIENT_SECRET;
|
||||
const aiConfigured = env.OPENROUTER_API_KEY; // We avoid live-calling the AI provider here
|
||||
|
||||
// Storage configuration check
|
||||
const storageConfigured = Boolean(process.env.BLOB_READ_WRITE_TOKEN);
|
||||
const storageType: "local" | "remote" = storageConfigured ? "remote" : "local";
|
||||
|
||||
const overallStatus: StatusLevel = (() => {
|
||||
if (!env.POSTGRES_URL || !dbConnected || !schemaApplied) return "error";
|
||||
if (!authConfigured) return "error";
|
||||
@@ -138,6 +146,10 @@ export async function GET(req: Request) {
|
||||
ai: {
|
||||
configured: aiConfigured,
|
||||
},
|
||||
storage: {
|
||||
configured: storageConfigured,
|
||||
type: storageType,
|
||||
},
|
||||
overallStatus,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user