fix
This commit is contained in:
1 parent
ac8e41fcce
commit
2a798744fb
1 file changed
+2
-2
@@ -25,9 +25,9 @@ export const useMarkeyScanStore = defineStore(marketScans, () => {
|
||||
const types = computed(() => marketScan.value?.types ?? []);
|
||||
const setTypes = async (types: number[]) => {
|
||||
if (marketScan.value?.id) {
|
||||
pb.collection(marketScans).update(marketScan.value.id, { owner: pb.authStore.model!.id, types });
|
||||
marketScan.value = await pb.collection(marketScans).update(marketScan.value.id, { owner: pb.authStore.model!.id, types });
|
||||
} else {
|
||||
pb.collection(marketScans).create({ owner: pb.authStore.model!.id, types });
|
||||
marketScan.value = await pb.collection(marketScans).create({ owner: pb.authStore.model!.id, types });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user