release v2.0.0 #4

Merged
crimsen merged 481 commits from develop into master 2024-01-18 15:15:08 +00:00
1 changed files with 9 additions and 1 deletions
Showing only changes of commit dad88ec766 - Show all commits

View File

@ -91,7 +91,15 @@ export const useUserStore = defineStore({
},
async updateRole(role: FG.Role) {
await api.put(`/roles/${role.id}`, role);
try {
await api.put(`/roles/${role.id}`, role);
} catch (error) {
console.warn(error);
}
this._updatePermission(role);
},
_updatePermission(role: FG.Role) {
const idx = this.roles.findIndex((r) => r.id === role.id);
if (idx != -1) this.roles[idx] = role;
this._dirty_roles = true;