fix: id for privileges in tariff
All checks were successful
Deploy / CreateImage (push) Successful in 1m34s
Deploy / DeployService (push) Successful in 26s

This commit is contained in:
skeris 2025-06-08 19:57:26 +03:00
parent 419fa6e839
commit 2474ab030e

@ -160,6 +160,7 @@ func (t *Tariff) Update(ctx context.Context, tariffID primitive.ObjectID, req mo
for i, privilege := range req.Privileges {
origPrivilege := privilegeMap[privilege.PrivilegeID]
clean[i] = models.Privilege{
ID: origPrivilege.ID,
Name: origPrivilege.Name,
PrivilegeID: origPrivilege.PrivilegeID,
ServiceKey: origPrivilege.ServiceKey,
@ -172,6 +173,7 @@ func (t *Tariff) Update(ctx context.Context, tariffID primitive.ObjectID, req mo
update := bson.M{
"$set": bson.M{
"description": req.Description,
"order": req.Order,
"name": req.Name,
"price": req.Price,