top | item 40772431 (no title) chilling | 1 year ago so how would you approach this? discuss order hn newest porridgeraisin|1 year ago Just do hincrby alone, if it doesn't exist it will automatically become 1 chilling|1 year ago You are right. It just should be like so:Get: const likes = (await kv.hget(postTitle, "likes")) || 0 Post: const likes = await kv.hincrby(postTitle, "likes", 1);
porridgeraisin|1 year ago Just do hincrby alone, if it doesn't exist it will automatically become 1 chilling|1 year ago You are right. It just should be like so:Get: const likes = (await kv.hget(postTitle, "likes")) || 0 Post: const likes = await kv.hincrby(postTitle, "likes", 1);
chilling|1 year ago You are right. It just should be like so:Get: const likes = (await kv.hget(postTitle, "likes")) || 0 Post: const likes = await kv.hincrby(postTitle, "likes", 1);
porridgeraisin|1 year ago
chilling|1 year ago
Get:
Post: