Implement different DTOs for users and admins (#644)

* Implement different DTOs for users and admins
* Fix performance by not creating unnecessary websocket connections
This commit is contained in:
Simon
2025-07-22 14:52:59 +02:00
committed by GitHub
parent 2e596bf7a3
commit 791ddf8ce2
39 changed files with 516 additions and 353 deletions
+1 -3
View File
@@ -31,7 +31,7 @@ export const libraryState = proxy<LibraryState>({
/** Subscribe to and process state updates from backend **/
export async function initializeLibraryState() {
if (libraryState.isLoaded) return libraryState;
if (libraryState.isLoaded) return;
// Fetch initial library list
const initialEntries = await LibraryEndpoint.getAll();
@@ -57,6 +57,4 @@ export async function initializeLibraryState() {
}
})
});
return libraryState;
}