Debug: Force Mongo DB connection bypassing sk_db_ check
This commit is contained in:
1 parent
919e83331a
commit
8dd8432c29
2 files changed
+3
-3
No files matched your search
@@ -21,7 +21,7 @@ export default function UptimeStatsCards({
|
||||
<div className="absolute top-0 right-0 p-3 opacity-10 group-hover:opacity-20 transition-opacity">
|
||||
<Server className="w-12 h-12 text-blue-400" />
|
||||
</div>
|
||||
<span className="text-slate-400 uppercase tracking-wider mb-1 text-[10px] font-medium">TOTAL AGENTS (V5)</span>
|
||||
<span className="text-slate-400 uppercase tracking-wider mb-1 text-[10px] font-medium">TOTAL AGENTS (V6)</span>
|
||||
<span className="text-2xl font-bold text-white tracking-tight">{totalAgents}</span>
|
||||
</div>
|
||||
<div className="bg-slate-900/50 backdrop-blur-sm border border-slate-800/80 p-5 rounded-2xl flex flex-col relative overflow-hidden group">
|
||||
|
||||
@@ -35,7 +35,7 @@ export async function getAgents(clientSiteUuid?: string): Promise<Agent[]> {
|
||||
}
|
||||
|
||||
// All agent data comes from MongoDB agent_registry (single source of truth)
|
||||
if (API_KEY && API_KEY.startsWith("sk_db_")) {
|
||||
if (true) {
|
||||
const MONGODB_URI = process.env.MONGODB_URI || 'mongodb://127.0.0.1:27017/backone_dpi';
|
||||
|
||||
try {
|
||||
@@ -79,7 +79,7 @@ export async function getAgents(clientSiteUuid?: string): Promise<Agent[]> {
|
||||
export async function getAgent(agentId: string): Promise<Agent | null> {
|
||||
try {
|
||||
const API_KEY = getApiKey();
|
||||
if (API_KEY && API_KEY.startsWith("sk_db_")) {
|
||||
if (true) {
|
||||
const agents = await getAgents();
|
||||
return agents.find(a => a.uuid === agentId || String(a.id) === agentId) || null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user