replace id type

This commit is contained in:
kandrusyak
2023-07-18 01:16:04 +03:00
parent b74291f449
commit 03cb8c3e38
4 changed files with 26 additions and 20 deletions

View File

@@ -6,6 +6,7 @@ import (
"astra-events/pkg/api"
"encoding/json"
"errors"
"github.com/google/uuid"
"net/http"
"net/url"
"strconv"
@@ -33,9 +34,9 @@ func GetUser(ID uint, header http.Header) (*model.User, error) {
return u, nil
}
func GetUsers(ids []uint, header http.Header) (map[uint]model.User, error) {
func GetUsers(ids []uuid.UUID, header http.Header) (map[uuid.UUID]model.User, error) {
var users []model.User
var usersMap = make(map[uint]model.User)
var usersMap = make(map[uuid.UUID]model.User)
Url, err := url.Parse(config.Env.MSHosts.UsersHost)
if err != nil {
return nil, err