Skip to content

Commit 0b0690f

Browse files
author
haoxin
committed
convert tab to space
1 parent 9205a0a commit 0b0690f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

index.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Limiter.prototype.get = function (fn) {
6868
function create() {
6969
var ex = (Date.now() + duration) / 1000 | 0;
7070

71-
db.multi()
71+
db.multi()
7272
.set([count, max, 'PX', duration, 'NX'])
7373
.set([limit, max, 'PX', duration, 'NX'])
7474
.set([reset, ex, 'PX', duration, 'NX'])
@@ -116,15 +116,15 @@ Limiter.prototype.get = function (fn) {
116116
}
117117

118118
function mget() {
119-
db.watch([count], function (err) {
120-
if (err) return fn(err);
121-
db.mget([count, limit, reset], function (err, res) {
122-
if (err) return fn(err);
123-
if (!res[0] && res[0] !== 0) return create();
124-
125-
decr(res);
126-
});
127-
});
119+
db.watch([count], function (err) {
120+
if (err) return fn(err);
121+
db.mget([count, limit, reset], function (err, res) {
122+
if (err) return fn(err);
123+
if (!res[0] && res[0] !== 0) return create();
124+
125+
decr(res);
126+
});
127+
});
128128
}
129129

130130
mget();

0 commit comments

Comments
 (0)