mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: remove unnecessary userPreferences findOne
This commit is contained in:
parent
52f85517bf
commit
39572702a0
4 changed files with 6 additions and 14 deletions
|
@ -12,7 +12,7 @@ import { Aria2 } from "./services/aria2";
|
|||
import { Downloader } from "@shared";
|
||||
import { IsNull, Not } from "typeorm";
|
||||
|
||||
const loadState = async (userPreferences: UserPreferences | null) => {
|
||||
export const loadState = async (userPreferences: UserPreferences | null) => {
|
||||
await import("./events");
|
||||
|
||||
Aria2.spawn();
|
||||
|
@ -49,11 +49,3 @@ const loadState = async (userPreferences: UserPreferences | null) => {
|
|||
|
||||
startMainLoop();
|
||||
};
|
||||
|
||||
userPreferencesRepository
|
||||
.findOne({
|
||||
where: { id: 1 },
|
||||
})
|
||||
.then((userPreferences) => {
|
||||
loadState(userPreferences);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue