refactor: remove redundant calls for getCurrentUser

This commit is contained in:
Prayag Prajapati committed 2024-09-25 20:35:38 +05:30
1 parent e82ff1ff0c
commit 647dcc3690
35 files changed
+651 -690

No files matched your search

+4 -2
View File
@@ -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);
};