refactor: remove redundant calls for getCurrentUser
This commit is contained in:
35 files changed
+651
-690
No files matched your search
@@ -40,10 +40,12 @@ export const setDefaultServer = async (
|
||||
|
||||
/**
|
||||
* Get a Server
|
||||
* @returns {ServerInfo}
|
||||
*/
|
||||
export const getServer = async (serverId: string | null) => {
|
||||
export const getServer = async (
|
||||
serverId: string | null,
|
||||
): Promise<ServerInfo | undefined> => {
|
||||
const servers = await getAllServers();
|
||||
|
||||
return servers.find((server) => server.id === serverId);
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user