feat: auto update profiles

This commit is contained in:
GyDi
2021-12-21 22:48:39 +08:00
parent 81aef736d6
commit f72536bce0
2 changed files with 15 additions and 7 deletions

View File

@@ -48,7 +48,7 @@ export interface ProfilesConfig {
}
export async function getProfiles() {
return invoke<ProfilesConfig | null>("get_profiles");
return (await invoke<ProfilesConfig>("get_profiles")) ?? {};
}
export async function setProfiles(current: number, profile: ProfileItem) {