fix
This commit is contained in:
@@ -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