nie wiedzieju

This commit is contained in:
GitProtogen
2026-03-18 12:07:29 +01:00
parent d3fc2a65d9
commit da5f87d67b
6 changed files with 36 additions and 19 deletions
+10 -1
View File
@@ -29,10 +29,19 @@ func DeleteGroup(ctx context.Context, chatGroup *ChatGroup) {
func CreateClient(ctx context.Context, client *Client) error {
mu.Lock()
defer mu.Unlock()
err := SaveClientWithoutGroups(ctx, client)
clients[client.Id] = client
hashed, err := bcrypt.GenerateFromPassword([]byte(client.PasswordHash), bcrypt.DefaultCost)
if err != nil {
return err
}
client.PasswordHash = string(hashed)
//err := DbSaveClientWithoutGroups(ctx, client)
//if err != nil {
// return err
//}
return nil
}