mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
15 lines
406 B
TypeScript
15 lines
406 B
TypeScript
import { userPreferencesRepository } from "@main/repository";
|
|
import { defaultDownloadsPath } from "@main/constants";
|
|
|
|
export const getDownloadsPath = async () => {
|
|
const userPreferences = await userPreferencesRepository.findOne({
|
|
where: {
|
|
id: 1,
|
|
},
|
|
});
|
|
|
|
if (userPreferences && userPreferences.downloadsPath)
|
|
return userPreferences.downloadsPath;
|
|
|
|
return defaultDownloadsPath;
|
|
};
|