Next.js Discord

Discord Forum

Using KV for storage - hdel is not deleting the record

Unanswered
AM posted this in #help-forum
Open in Discord
Avatar
AMOP
So i have record stored: { email: 'email@me.com', id: '123' } under the user:me key,
but when i try to delete it:

export async function delKvAction(key: string, fields: Array<string>) {
  return await kv.hdel(key, ...fields);
}


data keep persisting...

i've tried with and without passing fields:

await delKvAction(KV_KEYS.USER, ['email', 'id']); but record is still there anyone have faced same issue?

0 Replies