mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
dashboard
This commit is contained in:
1 parent
09580cebf5
commit
c2a4901cf7
3 files changed
+63
-16
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user