Small tweaks + whitespace
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
const db = require("./redis");
|
||||
|
||||
function incrementCounter(counter, key, by) {
|
||||
function incrementCounter(counter, key, by = 1) {
|
||||
return new Promise((resolve, reject) => {
|
||||
db.hincrby(counter, key, by, (error, value) => {
|
||||
if (error) {
|
||||
|
Reference in New Issue
Block a user