mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-17 06:30:50 +01:00
refactored permission system and error handling
This commit is contained in:
@ -37,13 +37,14 @@ export const usePasswordGroupStore = defineStore('passwordGroupStore', () => {
|
||||
) => {
|
||||
const group = groups.value.find((group) => group.id === groupId)
|
||||
console.log('getParentChain1: found group', group, chain)
|
||||
if (group) {
|
||||
/* if (group) {
|
||||
chain.push(group)
|
||||
console.log('getParentChain: found group', group, chain)
|
||||
return getParentChain(group.parentId, chain)
|
||||
}
|
||||
|
||||
return chain.reverse()
|
||||
return chain.reverse() */
|
||||
return []
|
||||
}
|
||||
|
||||
const syncGroupItemsAsync = async () => {
|
||||
@ -322,7 +323,7 @@ const deleteGroupAsync = async (groupId: string, final: boolean = false) => {
|
||||
const items = (await readByGroupIdAsync(groupId)) ?? []
|
||||
console.log('deleteGroupAsync delete Items', items)
|
||||
for (const item of items) {
|
||||
await deleteAsync(item.id, true)
|
||||
if (item) await deleteAsync(item.id, true)
|
||||
}
|
||||
|
||||
return await currentVault?.drizzle
|
||||
|
||||
@ -33,7 +33,6 @@ export const usePasswordItemStore = defineStore('passwordItemStore', () => {
|
||||
|
||||
const syncItemsAsync = async () => {
|
||||
const { currentVault } = useVaultStore()
|
||||
|
||||
items.value =
|
||||
(await currentVault?.drizzle
|
||||
.select()
|
||||
|
||||
Reference in New Issue
Block a user