This commit is contained in:
2023-09-20 23:32:31 +02:00
parent ac8e41fcce
commit 2a798744fb

View File

@@ -25,9 +25,9 @@ export const useMarkeyScanStore = defineStore(marketScans, () => {
const types = computed(() => marketScan.value?.types ?? []); const types = computed(() => marketScan.value?.types ?? []);
const setTypes = async (types: number[]) => { const setTypes = async (types: number[]) => {
if (marketScan.value?.id) { 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 { } else {
pb.collection(marketScans).create({ owner: pb.authStore.model!.id, types }); marketScan.value = await pb.collection(marketScans).create({ owner: pb.authStore.model!.id, types });
} }
} }