commit
This commit is contained in:
125
go_backend/utils/cache.go
Normal file
125
go_backend/utils/cache.go
Normal file
@@ -0,0 +1,125 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"ai_xhs/database"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"github.com/redis/go-redis/v9"
|
||||
)
|
||||
|
||||
// SetCache 设置缓存
|
||||
func SetCache(ctx context.Context, key string, value interface{}, expiration time.Duration) error {
|
||||
data, err := json.Marshal(value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return database.RDB.Set(ctx, key, data, expiration).Err()
|
||||
}
|
||||
|
||||
// GetCache 获取缓存
|
||||
func GetCache(ctx context.Context, key string, dest interface{}) error {
|
||||
data, err := database.RDB.Get(ctx, key).Bytes()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return json.Unmarshal(data, dest)
|
||||
}
|
||||
|
||||
// DelCache 删除缓存
|
||||
func DelCache(ctx context.Context, keys ...string) error {
|
||||
return database.RDB.Del(ctx, keys...).Err()
|
||||
}
|
||||
|
||||
// ExistsCache 检查缓存是否存在
|
||||
func ExistsCache(ctx context.Context, key string) (bool, error) {
|
||||
count, err := database.RDB.Exists(ctx, key).Result()
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
return count > 0, nil
|
||||
}
|
||||
|
||||
// ExpireCache 设置缓存过期时间
|
||||
func ExpireCache(ctx context.Context, key string, expiration time.Duration) error {
|
||||
return database.RDB.Expire(ctx, key, expiration).Err()
|
||||
}
|
||||
|
||||
// GetTTL 获取缓存剩余生存时间
|
||||
func GetTTL(ctx context.Context, key string) (time.Duration, error) {
|
||||
return database.RDB.TTL(ctx, key).Result()
|
||||
}
|
||||
|
||||
// IncrCache 递增计数器
|
||||
func IncrCache(ctx context.Context, key string) (int64, error) {
|
||||
return database.RDB.Incr(ctx, key).Result()
|
||||
}
|
||||
|
||||
// DecrCache 递减计数器
|
||||
func DecrCache(ctx context.Context, key string) (int64, error) {
|
||||
return database.RDB.Decr(ctx, key).Result()
|
||||
}
|
||||
|
||||
// SetCacheNX 设置缓存(仅当key不存在时)
|
||||
func SetCacheNX(ctx context.Context, key string, value interface{}, expiration time.Duration) (bool, error) {
|
||||
data, err := json.Marshal(value)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
return database.RDB.SetNX(ctx, key, data, expiration).Result()
|
||||
}
|
||||
|
||||
// HSetCache 设置哈希字段
|
||||
func HSetCache(ctx context.Context, key, field string, value interface{}) error {
|
||||
return database.RDB.HSet(ctx, key, field, value).Err()
|
||||
}
|
||||
|
||||
// HGetCache 获取哈希字段
|
||||
func HGetCache(ctx context.Context, key, field string) (string, error) {
|
||||
return database.RDB.HGet(ctx, key, field).Result()
|
||||
}
|
||||
|
||||
// HGetAllCache 获取哈希所有字段
|
||||
func HGetAllCache(ctx context.Context, key string) (map[string]string, error) {
|
||||
return database.RDB.HGetAll(ctx, key).Result()
|
||||
}
|
||||
|
||||
// HDelCache 删除哈希字段
|
||||
func HDelCache(ctx context.Context, key string, fields ...string) error {
|
||||
return database.RDB.HDel(ctx, key, fields...).Err()
|
||||
}
|
||||
|
||||
// SAddCache 添加集合成员
|
||||
func SAddCache(ctx context.Context, key string, members ...interface{}) error {
|
||||
return database.RDB.SAdd(ctx, key, members...).Err()
|
||||
}
|
||||
|
||||
// SMembersCache 获取集合所有成员
|
||||
func SMembersCache(ctx context.Context, key string) ([]string, error) {
|
||||
return database.RDB.SMembers(ctx, key).Result()
|
||||
}
|
||||
|
||||
// SRemCache 删除集合成员
|
||||
func SRemCache(ctx context.Context, key string, members ...interface{}) error {
|
||||
return database.RDB.SRem(ctx, key, members...).Err()
|
||||
}
|
||||
|
||||
// ZAddCache 添加有序集合成员
|
||||
func ZAddCache(ctx context.Context, key string, score float64, member interface{}) error {
|
||||
z := redis.Z{
|
||||
Score: score,
|
||||
Member: member,
|
||||
}
|
||||
return database.RDB.ZAdd(ctx, key, z).Err()
|
||||
}
|
||||
|
||||
// ZRangeCache 获取有序集合指定范围成员
|
||||
func ZRangeCache(ctx context.Context, key string, start, stop int64) ([]string, error) {
|
||||
return database.RDB.ZRange(ctx, key, start, stop).Result()
|
||||
}
|
||||
|
||||
// ZRemCache 删除有序集合成员
|
||||
func ZRemCache(ctx context.Context, key string, members ...interface{}) error {
|
||||
return database.RDB.ZRem(ctx, key, members...).Err()
|
||||
}
|
||||
@@ -2,7 +2,9 @@ package utils
|
||||
|
||||
import (
|
||||
"ai_xhs/config"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
@@ -44,3 +46,45 @@ func ParseToken(tokenString string) (*Claims, error) {
|
||||
|
||||
return nil, errors.New("invalid token")
|
||||
}
|
||||
|
||||
// StoreTokenInRedis 将Token存入Redis
|
||||
func StoreTokenInRedis(ctx context.Context, employeeID int, tokenString string) error {
|
||||
// Redis key: token:employee:{employeeID}
|
||||
key := fmt.Sprintf("token:employee:%d", employeeID)
|
||||
|
||||
// 存储token,过期时间与JWT一致
|
||||
expiration := time.Duration(config.AppConfig.JWT.ExpireHours) * time.Hour
|
||||
return SetCache(ctx, key, tokenString, expiration)
|
||||
}
|
||||
|
||||
// ValidateTokenInRedis 验证Token是否在Redis中存在(校验是否被禁用)
|
||||
func ValidateTokenInRedis(ctx context.Context, employeeID int, tokenString string) error {
|
||||
key := fmt.Sprintf("token:employee:%d", employeeID)
|
||||
|
||||
// 从Redis获取存储的token
|
||||
var storedToken string
|
||||
err := GetCache(ctx, key, &storedToken)
|
||||
if err != nil {
|
||||
return errors.New("token已失效或用户已被禁用")
|
||||
}
|
||||
|
||||
// 比对token是否一致
|
||||
if storedToken != tokenString {
|
||||
return errors.New("token不匹配,用户可能已重新登录")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RevokeToken 撤销Token(禁用用户)
|
||||
func RevokeToken(ctx context.Context, employeeID int) error {
|
||||
key := fmt.Sprintf("token:employee:%d", employeeID)
|
||||
return DelCache(ctx, key)
|
||||
}
|
||||
|
||||
// RevokeAllUserTokens 撤销用户的所有Token(如果有多设备登录)
|
||||
func RevokeAllUserTokens(ctx context.Context, employeeID int) error {
|
||||
// 当前实现:一个用户只保存一个token
|
||||
// 如果需要支持多设备,可以改为 token:employee:{employeeID}:{deviceID}
|
||||
return RevokeToken(ctx, employeeID)
|
||||
}
|
||||
|
||||
351
go_backend/utils/oss.go
Normal file
351
go_backend/utils/oss.go
Normal file
@@ -0,0 +1,351 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"ai_xhs/config"
|
||||
"fmt"
|
||||
"io"
|
||||
"mime"
|
||||
"mime/multipart"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/aliyun/aliyun-oss-go-sdk/oss"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
// OSSStorage 阿里云OSS存储服务
|
||||
type OSSStorage struct {
|
||||
client *oss.Client
|
||||
bucket *oss.Bucket
|
||||
config *config.OSSConfig
|
||||
}
|
||||
|
||||
var ossStorage *OSSStorage
|
||||
|
||||
// InitOSS 初始化OSS客户端
|
||||
func InitOSS() error {
|
||||
cfg := &config.AppConfig.Upload.OSS
|
||||
|
||||
// 打印详细配置信息用于调试
|
||||
fmt.Printf("\n=== OSS初始化配置 ===\n")
|
||||
fmt.Printf("Endpoint: [%s]\n", cfg.Endpoint)
|
||||
fmt.Printf("AccessKeyID: [%s]\n", cfg.AccessKeyID)
|
||||
fmt.Printf("AccessKeySecret: [%s] (长度: %d)\n", cfg.AccessKeySecret, len(cfg.AccessKeySecret))
|
||||
fmt.Printf("BucketName: [%s]\n", cfg.BucketName)
|
||||
fmt.Printf("BasePath: [%s]\n", cfg.BasePath)
|
||||
fmt.Printf("Domain: [%s]\n", cfg.Domain)
|
||||
fmt.Printf("==================\n\n")
|
||||
|
||||
// 创建OSSClient实例
|
||||
client, err := oss.New(cfg.Endpoint, cfg.AccessKeyID, cfg.AccessKeySecret)
|
||||
if err != nil {
|
||||
return fmt.Errorf("创建OSS客户端失败: %w", err)
|
||||
}
|
||||
|
||||
// 获取存储空间
|
||||
bucket, err := client.Bucket(cfg.BucketName)
|
||||
if err != nil {
|
||||
return fmt.Errorf("获取OSS Bucket失败: %w", err)
|
||||
}
|
||||
|
||||
ossStorage = &OSSStorage{
|
||||
client: client,
|
||||
bucket: bucket,
|
||||
config: cfg,
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// min 辅助函数
|
||||
func min(a, b int) int {
|
||||
if a < b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// UploadFile 上传文件到OSS
|
||||
func (s *OSSStorage) UploadFile(file multipart.File, filename string, objectPath string) (string, error) {
|
||||
// 生成OSS对象路径
|
||||
objectKey := s.generateObjectKey(objectPath, filename)
|
||||
|
||||
// 获取文件MIME类型
|
||||
contentType := getContentType(filename)
|
||||
|
||||
// 上传文件到OSS,设置Content-Type和其他元数据
|
||||
// 使用 ObjectACL 设置为公共读,确保文件可以直接访问
|
||||
err := s.bucket.PutObject(objectKey, file,
|
||||
oss.ContentType(contentType),
|
||||
oss.ObjectACL(oss.ACLPublicRead),
|
||||
oss.ContentDisposition("inline"), // 关键:设置为inline而不是attachment
|
||||
)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("上传文件到OSS失败: %w", err)
|
||||
}
|
||||
|
||||
// 获取OSS返回的文件URL
|
||||
fileURL, err := s.GetFileURL(objectKey)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("获取OSS文件URL失败: %w", err)
|
||||
}
|
||||
return fileURL, nil
|
||||
}
|
||||
|
||||
// UploadFromBytes 从字节数组上传文件到OSS
|
||||
func (s *OSSStorage) UploadFromBytes(data []byte, filename string, objectPath string) (string, error) {
|
||||
// 生成OSS对象路径
|
||||
objectKey := s.generateObjectKey(objectPath, filename)
|
||||
|
||||
// 获取文件MIME类型
|
||||
contentType := getContentType(filename)
|
||||
|
||||
// 上传文件到OSS,设置Content-Type和其他元数据
|
||||
err := s.bucket.PutObject(objectKey, strings.NewReader(string(data)),
|
||||
oss.ContentType(contentType),
|
||||
oss.ObjectACL(oss.ACLPublicRead),
|
||||
oss.ContentDisposition("inline"),
|
||||
)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("上传文件到OSS失败: %w", err)
|
||||
}
|
||||
|
||||
// 获取OSS返回的文件URL
|
||||
fileURL, err := s.GetFileURL(objectKey)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("获取OSS文件URL失败: %w", err)
|
||||
}
|
||||
return fileURL, nil
|
||||
}
|
||||
|
||||
// UploadFromReader 从Reader上传文件到OSS
|
||||
func (s *OSSStorage) UploadFromReader(reader io.Reader, filename string, objectPath string) (string, error) {
|
||||
// 生成OSS对象路径
|
||||
objectKey := s.generateObjectKey(objectPath, filename)
|
||||
|
||||
// 获取文件MIME类型
|
||||
contentType := getContentType(filename)
|
||||
|
||||
// 打印详细上传信息
|
||||
fmt.Printf("\n=== OSS上传请求 ===\n")
|
||||
fmt.Printf("ObjectKey: [%s]\n", objectKey)
|
||||
fmt.Printf("ContentType: [%s]\n", contentType)
|
||||
fmt.Printf("Endpoint: [%s]\n", s.config.Endpoint)
|
||||
fmt.Printf("BucketName: [%s]\n", s.config.BucketName)
|
||||
fmt.Printf("AccessKeyID: [%s]\n", s.config.AccessKeyID)
|
||||
fmt.Printf("AccessKeySecret: [%s]\n", s.config.AccessKeySecret)
|
||||
fmt.Printf("==================\n\n")
|
||||
|
||||
// 上传文件到OSS,设置Content-Type和其他元数据
|
||||
err := s.bucket.PutObject(objectKey, reader,
|
||||
oss.ContentType(contentType),
|
||||
oss.ObjectACL(oss.ACLPublicRead),
|
||||
oss.ContentDisposition("inline"),
|
||||
)
|
||||
if err != nil {
|
||||
fmt.Printf("\n!!! OSS上传失败 !!!\n")
|
||||
fmt.Printf("错误详情: %v\n", err)
|
||||
fmt.Printf("错误类型: %T\n", err)
|
||||
fmt.Printf("==================\n\n")
|
||||
return "", fmt.Errorf("上传文件到OSS失败: %w", err)
|
||||
}
|
||||
|
||||
// 获取OSS返回的文件URL
|
||||
fileURL, err := s.GetFileURL(objectKey)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("获取OSS文件URL失败: %w", err)
|
||||
}
|
||||
|
||||
fmt.Printf("✓ OSS上传成功: %s\n\n", fileURL)
|
||||
return fileURL, nil
|
||||
}
|
||||
|
||||
// DeleteFile 删除OSS中的文件
|
||||
func (s *OSSStorage) DeleteFile(objectKey string) error {
|
||||
err := s.bucket.DeleteObject(objectKey)
|
||||
if err != nil {
|
||||
return fmt.Errorf("删除OSS文件失败: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsObjectExist 检查对象是否存在
|
||||
func (s *OSSStorage) IsObjectExist(objectKey string) (bool, error) {
|
||||
exist, err := s.bucket.IsObjectExist(objectKey)
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("检查OSS对象是否存在失败: %w", err)
|
||||
}
|
||||
return exist, nil
|
||||
}
|
||||
|
||||
// GetFileURL 获取文件访问URL(使用OSS SDK标准方法)
|
||||
func (s *OSSStorage) GetFileURL(objectKey string) (string, error) {
|
||||
// 如果配置了自定义域名,使用自定义域名
|
||||
if s.config.Domain != "" {
|
||||
// 确保 Domain 以 https:// 开头
|
||||
domain := s.config.Domain
|
||||
if !strings.HasPrefix(domain, "http://") && !strings.HasPrefix(domain, "https://") {
|
||||
domain = "https://" + domain
|
||||
}
|
||||
url := fmt.Sprintf("%s/%s", strings.TrimRight(domain, "/"), objectKey)
|
||||
return url, nil
|
||||
}
|
||||
|
||||
// 使用OSS SDK获取对象的公共URL
|
||||
// 正确格式:https://bucket-name.endpoint/objectKey
|
||||
// Endpoint 不应该包含 https://
|
||||
endpoint := s.config.Endpoint
|
||||
// 移除 endpoint 中可能存在的协议前缀
|
||||
endpoint = strings.TrimPrefix(endpoint, "https://")
|
||||
endpoint = strings.TrimPrefix(endpoint, "http://")
|
||||
endpoint = strings.TrimRight(endpoint, "/")
|
||||
|
||||
// 移除 objectKey 开头的斜杠
|
||||
objectKey = strings.TrimLeft(objectKey, "/")
|
||||
|
||||
url := fmt.Sprintf("https://%s.%s/%s", s.config.BucketName, endpoint, objectKey)
|
||||
return url, nil
|
||||
}
|
||||
|
||||
// GeneratePresignedURL 生成临时访问URL(带签名)
|
||||
func (s *OSSStorage) GeneratePresignedURL(objectKey string, expireSeconds int64) (string, error) {
|
||||
signedURL, err := s.bucket.SignURL(objectKey, oss.HTTPGet, expireSeconds)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("生成预签名URL失败: %w", err)
|
||||
}
|
||||
return signedURL, nil
|
||||
}
|
||||
|
||||
// generateObjectKey 生成OSS对象键名
|
||||
func (s *OSSStorage) generateObjectKey(objectPath string, filename string) string {
|
||||
// 组合基础路径和对象路径
|
||||
basePath := strings.TrimRight(s.config.BasePath, "/")
|
||||
objectPath = strings.TrimLeft(objectPath, "/")
|
||||
|
||||
// OSS 路径统一使用斜杠,避免 Windows 下使用反斜杠
|
||||
if basePath == "" {
|
||||
return strings.ReplaceAll(filepath.ToSlash(filepath.Join(objectPath, filename)), "\\", "/")
|
||||
}
|
||||
|
||||
return strings.ReplaceAll(filepath.ToSlash(filepath.Join(basePath, objectPath, filename)), "\\", "/")
|
||||
}
|
||||
|
||||
// UploadToOSS 上传文件到OSS(兼容旧接口)
|
||||
func UploadToOSS(reader io.Reader, originalFilename string) (string, error) {
|
||||
if ossStorage == nil {
|
||||
return "", fmt.Errorf("OSS未初始化,请先调用InitOSS()")
|
||||
}
|
||||
|
||||
// 生成唯一文件名
|
||||
filename := GenerateFilename(originalFilename)
|
||||
|
||||
// 使用日期目录作为路径
|
||||
objectPath := time.Now().Format("20060102")
|
||||
|
||||
return ossStorage.UploadFromReader(reader, filename, objectPath)
|
||||
}
|
||||
|
||||
// DeleteFromOSS 从OSS删除文件(兼容旧接口)
|
||||
func DeleteFromOSS(fileURL string) error {
|
||||
if ossStorage == nil {
|
||||
return fmt.Errorf("OSS未初始化")
|
||||
}
|
||||
|
||||
cfg := ossStorage.config
|
||||
|
||||
// 从URL中提取ObjectKey
|
||||
var objectKey string
|
||||
if cfg.Domain != "" {
|
||||
// 自定义域名格式: https://domain.com/path/file.jpg
|
||||
domain := cfg.Domain
|
||||
if !strings.HasPrefix(domain, "http://") && !strings.HasPrefix(domain, "https://") {
|
||||
domain = "https://" + domain
|
||||
}
|
||||
objectKey = strings.TrimPrefix(fileURL, fmt.Sprintf("%s/", strings.TrimRight(domain, "/")))
|
||||
} else {
|
||||
// 默认域名格式: https://bucket.endpoint/path/file.jpg
|
||||
endpoint := strings.TrimPrefix(cfg.Endpoint, "https://")
|
||||
endpoint = strings.TrimPrefix(endpoint, "http://")
|
||||
objectKey = strings.TrimPrefix(fileURL, fmt.Sprintf("https://%s.%s/", cfg.BucketName, endpoint))
|
||||
}
|
||||
|
||||
return ossStorage.DeleteFile(objectKey)
|
||||
}
|
||||
|
||||
// GenerateFilename 生成唯一文件名
|
||||
func GenerateFilename(originalFilename string) string {
|
||||
ext := filepath.Ext(originalFilename)
|
||||
name := strings.TrimSuffix(originalFilename, ext)
|
||||
|
||||
// 生成时间戳和UUID
|
||||
timestamp := time.Now().Format("20060102150405")
|
||||
uuidStr := uuid.New().String()[:8]
|
||||
|
||||
// 清理文件名,移除特殊字符
|
||||
name = strings.ReplaceAll(name, " ", "_")
|
||||
name = strings.ReplaceAll(name, "(", "")
|
||||
name = strings.ReplaceAll(name, ")", "")
|
||||
|
||||
return fmt.Sprintf("%s_%s_%s%s", name, timestamp, uuidStr, ext)
|
||||
}
|
||||
|
||||
// IsValidImageType 验证图片文件类型
|
||||
func IsValidImageType(filename string) bool {
|
||||
ext := strings.ToLower(filepath.Ext(filename))
|
||||
validExts := []string{".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"}
|
||||
|
||||
for _, validExt := range validExts {
|
||||
if ext == validExt {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// getContentType 根据文件名获取MIME类型
|
||||
func getContentType(filename string) string {
|
||||
ext := strings.ToLower(filepath.Ext(filename))
|
||||
|
||||
// 常见图片类型
|
||||
switch ext {
|
||||
case ".jpg", ".jpeg":
|
||||
return "image/jpeg"
|
||||
case ".png":
|
||||
return "image/png"
|
||||
case ".gif":
|
||||
return "image/gif"
|
||||
case ".webp":
|
||||
return "image/webp"
|
||||
case ".svg":
|
||||
return "image/svg+xml"
|
||||
case ".bmp":
|
||||
return "image/bmp"
|
||||
case ".ico":
|
||||
return "image/x-icon"
|
||||
// 常见文档类型
|
||||
case ".pdf":
|
||||
return "application/pdf"
|
||||
case ".doc":
|
||||
return "application/msword"
|
||||
case ".docx":
|
||||
return "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
||||
case ".xls":
|
||||
return "application/vnd.ms-excel"
|
||||
case ".xlsx":
|
||||
return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
case ".txt":
|
||||
return "text/plain; charset=utf-8"
|
||||
case ".json":
|
||||
return "application/json"
|
||||
case ".xml":
|
||||
return "application/xml"
|
||||
default:
|
||||
// 使用Go标准库自动检测
|
||||
if mimeType := mime.TypeByExtension(ext); mimeType != "" {
|
||||
return mimeType
|
||||
}
|
||||
// 默认类型
|
||||
return "application/octet-stream"
|
||||
}
|
||||
}
|
||||
19
go_backend/utils/password.go
Normal file
19
go_backend/utils/password.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// HashPassword 密码加密(使用SHA256,与Python版本保持一致)
|
||||
func HashPassword(password string) string {
|
||||
hash := sha256.Sum256([]byte(password))
|
||||
return hex.EncodeToString(hash[:])
|
||||
}
|
||||
|
||||
// VerifyPassword 验证密码
|
||||
func VerifyPassword(password, hashedPassword string) bool {
|
||||
fmt.Printf(HashPassword(password))
|
||||
return HashPassword(password) == hashedPassword
|
||||
}
|
||||
Reference in New Issue
Block a user