UPDATE: fix bug
All checks were successful
Build and Release / release (push) Successful in 1m5s

This commit is contained in:
2026-04-18 11:32:23 +07:00
parent 50b975abf6
commit 1558cf7001
3 changed files with 13 additions and 1 deletions

View File

@@ -154,7 +154,10 @@ func (r *mediaRepository) Delete(ctx context.Context, id pgtype.UUID) error {
cacheId := fmt.Sprintf("media:id:%s", convert.UUIDToString(id))
_ = r.c.Del(ctx, cacheId)
go func() {
bgCtx := context.Background()
_ = r.c.DelByPattern(bgCtx, "media:count*")
}()
return nil
}

View File

@@ -353,6 +353,10 @@ func (r *userRepository) Delete(ctx context.Context, id pgtype.UUID) error {
fmt.Sprintf("user:email:%s", user.Email),
fmt.Sprintf("user:token:%s", user.ID),
)
go func() {
bgCtx := context.Background()
_ = r.c.DelByPattern(bgCtx, "user:count*")
}()
return nil
}

View File

@@ -177,6 +177,11 @@ func (v *verificationRepository) Create(ctx context.Context, params sqlc.CreateU
}
_ = v.c.Del(ctx, fmt.Sprintf("verification:userId:%s", convert.UUIDToString(params.UserID)))
go func() {
bgCtx := context.Background()
_ = v.c.DelByPattern(bgCtx, "verification:count*")
}()
return &verification, nil
}