Other: Fix uninitialized userlist in gRPC GetUserList.

This commit is contained in:
Xavier Michelon
2022-08-29 10:41:55 +02:00
committed by Jakub
parent 6bbe2d0e00
commit 958334bd49

View File

@ -32,9 +32,10 @@ import (
func (s *Service) GetUserList(context.Context, *emptypb.Empty) (*UserListResponse, error) {
s.log.Info("GetUserList")
var userList []*User
userIDs := s.bridge.GetUserIDs()
userList := make([]*User, len(userIDs))
for idx, userID := range s.bridge.GetUserIDs() {
for idx, userID := range userIDs {
user, err := s.bridge.GetUserInfo(userID)
if err != nil {
return nil, err