mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: migrating to electron-vite
This commit is contained in:
commit
1db5a9c295
183 changed files with 18535 additions and 0 deletions
21
src/main/events/user-preferences/update-user-preferences.ts
Normal file
21
src/main/events/user-preferences/update-user-preferences.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { userPreferencesRepository } from "@main/repository";
|
||||
import { registerEvent } from "../register-event";
|
||||
|
||||
import type { UserPreferences } from "@types";
|
||||
|
||||
const updateUserPreferences = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
preferences: Partial<UserPreferences>
|
||||
) => {
|
||||
await userPreferencesRepository.upsert(
|
||||
{
|
||||
id: 1,
|
||||
...preferences,
|
||||
},
|
||||
["id"]
|
||||
);
|
||||
};
|
||||
|
||||
registerEvent(updateUserPreferences, {
|
||||
name: "updateUserPreferences",
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue