feat: docs

This commit is contained in:
2025-03-14 05:19:43 -04:00
parent 6ab00206df
commit d382485a7c
21 changed files with 4451 additions and 79 deletions

View File

@ -77,6 +77,9 @@ func (s *AuthHandler) SignUp(ctx context.Context, req *connect.Request[userv1.Si
} else {
return nil, connect.NewError(connect.CodeAlreadyExists, errors.New("username already exists"))
}
if req.Msg.Password != req.Msg.ConfirmPassword {
return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("passwords do not match"))
}
// Hash password
hash, err := bcrypt.GenerateFromPassword([]byte(req.Msg.Password), bcrypt.DefaultCost)