dohman
01/12/2022, 8:20 PMjs
rejectEntry: async function(item) {
let index = this.items.indexOf(item);
this.items.splice(index, 1);
const deleteEntry = await supabase
.from('submissions')
.delete()
.match(item.id)
if (deleteEntry.error) throw deleteEntry.error;
},
Can anyone suggest what was wrong? I assumed that .match would match the item ID from the table and remove that.silentworks
01/12/2022, 9:21 PM.match({ id: item.id })
moein
01/13/2022, 11:24 AMsilentworks
01/13/2022, 6:24 PM.match
is an object and if that object has both key and values, which seems like an overkill for something that is already documented. I think you can potentially get some of these benefits if you are using TypeScript as it should know the object shape that match requires