This commit is contained in:
parent
86453d483e
commit
800fc4f8d8
|
@ -3,6 +3,7 @@ package redis
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"errors"
|
"errors"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
@ -232,7 +233,7 @@ type AuthorProfile struct {
|
||||||
// and assigns the JSON string to the provided user's ID.
|
// and assigns the JSON string to the provided user's ID.
|
||||||
func (c *provider) GetUserAppDataFromRedis(userId string) (string, error) {
|
func (c *provider) GetUserAppDataFromRedis(userId string) (string, error) {
|
||||||
// Получаем профиль автора из Redis
|
// Получаем профиль автора из Redis
|
||||||
rkey := fmt.Sprintf("author:user:%s", userId)
|
rkey := fmt.Sprintf("author:user:%s", strings.TrimSpace(userId))
|
||||||
authorProfileString, err := c.store.Get(c.ctx, rkey).Result()
|
authorProfileString, err := c.store.Get(c.ctx, rkey).Result()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("redis GET:", rkey)
|
fmt.Println("redis GET:", rkey)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user