2024-07-01 10:56:14: merge [master:f9b2632335c35844013af97443dacebb9fc385c5];

This commit is contained in:
txix committed 2024-07-01 10:56:14 +03:00
1 parent cd985ff5a3
commit 6db18c1495
19 files changed
+107 -82

No files matched your search

+1
View File
@@ -1,3 +1,4 @@
// nolint:dupl
package repository
import (
+1 -1
View File
@@ -27,7 +27,7 @@ func (r DailyLimit) Increment(ctx context.Context, applicationId int, today time
}
if value == 1 {
err := r.cli.ExpireNX(ctx, key, 24*time.Hour).Err() //nolint:gomnd
err := r.cli.ExpireNX(ctx, key, 24*time.Hour).Err() //nolint:mnd,gomnd
if err != nil {
return 0, errors.WithMessage(err, "expire nx")
}
+1
View File
@@ -1,3 +1,4 @@
// nolint:dupl
package repository
import (
+1 -1
View File
@@ -30,7 +30,7 @@ func (r RedisAuthCache) Get(ctx context.Context, token string) (*domain.AuthData
p.Get(ctx, token)
return nil
})
if err != nil && err != redis.Nil {
if err != nil && !errors.Is(err, redis.Nil) {
return nil, errors.WithMessage(err, "pipelined")
}
+1 -1
View File
@@ -29,7 +29,7 @@ func (r RedisAuthzCache) Get(ctx context.Context, applicationId int, endpoint st
p.Get(ctx, r.key(applicationId, endpoint))
return nil
})
if err != nil && err != redis.Nil {
if err != nil && !errors.Is(err, redis.Nil) {
return false, errors.WithMessage(err, "pipelined")
}