dashboard

This commit is contained in:
NoLogicAlan committed 2026-05-08 00:30:29 +03:00
1 parent 09580cebf5
commit c2a4901cf7
3 files changed
+63 -16

No files matched your search

+8 -2
View File
@@ -43,8 +43,14 @@ export class Dashboard {
case "sharedServers": {
try {
const sharedUser = await this.remix.client.users.fetch(data.key).catch(() => null);
if (!sharedUser) return { error: "User not found" };
return await this.remix.getSharedServers(sharedUser);
if (!sharedUser) {
logger.dashboard("[Dashboard] sharedServers: user not found for key:", data.key);
return { error: "User not found" };
}
logger.dashboard("[Dashboard] sharedServers: fetching for user", sharedUser.id, sharedUser.username);
const result = await this.remix.getSharedServers(sharedUser);
logger.dashboard("[Dashboard] sharedServers: returning", Array.isArray(result) ? result.length + " servers" : JSON.stringify(result));
return result;
} catch (e) {
const id = Utils.uid();
logger.dashboard("[Dashboard] sharedServers error:", id, e);