mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
Remove unused util
This commit is contained in:
@@ -2,7 +2,6 @@ export * from './random-string';
|
|||||||
export * from './normalize-server-url';
|
export * from './normalize-server-url';
|
||||||
export * from './jellyfin';
|
export * from './jellyfin';
|
||||||
export * from './subsonic';
|
export * from './subsonic';
|
||||||
export * from './server-folder-auth';
|
|
||||||
export * from './set-local-storage-setttings';
|
export * from './set-local-storage-setttings';
|
||||||
export * from './constrain-sidebar-width';
|
export * from './constrain-sidebar-width';
|
||||||
export * from './title-case';
|
export * from './title-case';
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
import md5 from 'md5';
|
|
||||||
import { ServerFolderAuth } from '../../types';
|
|
||||||
|
|
||||||
export const getServerFolderAuth = (
|
|
||||||
serverUrl: string,
|
|
||||||
serverFolderId: number
|
|
||||||
) => {
|
|
||||||
const storedServersKey = `servers_${md5(serverUrl)}`;
|
|
||||||
const serversFromLocalStorage = localStorage.getItem(storedServersKey);
|
|
||||||
|
|
||||||
if (serversFromLocalStorage) {
|
|
||||||
const existingServers: ServerFolderAuth[] = JSON.parse(
|
|
||||||
serversFromLocalStorage
|
|
||||||
);
|
|
||||||
|
|
||||||
const server = existingServers.find((s) => s.id === serverFolderId);
|
|
||||||
return server;
|
|
||||||
}
|
|
||||||
|
|
||||||
return undefined;
|
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user