case 4504

This commit is contained in:
2023-04-15 00:35:34 +00:00
parent 85ccbdae58
commit a4d10e1da3
2 changed files with 13 additions and 1 deletions

View File

@@ -104,7 +104,7 @@ namespace Sockeye.Api.Controllers
else
return BadRequest(new ApiErrorResponse(biz.Errors));
}
return Ok(ApiOkResponse.Response(new { Concurrency = o.Concurrency })); ;
return Ok(ApiOkResponse.Response(o)); ;
}
/// <summary>

View File

@@ -56,6 +56,7 @@ namespace Sockeye.Biz
await SearchIndexAsync(newObject, true);
await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, newObject.Tags, null);
await HandlePotentialNotificationEvent(SockEvent.Created, newObject);
await PopulateVizFields(newObject);
return newObject;
}
}
@@ -70,6 +71,7 @@ namespace Sockeye.Biz
var ret = await ct.Subscription.AsNoTracking().SingleOrDefaultAsync(z => z.Id == id);
if (logTheGetEvent && ret != null)
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, id, BizType, SockEvent.Retrieved), ct);
await PopulateVizFields(ret);
return ret;
}
@@ -110,6 +112,7 @@ namespace Sockeye.Biz
await SearchIndexAsync(putObject, false);
await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, putObject.Tags, dbObject.Tags);
await HandlePotentialNotificationEvent(SockEvent.Modified, putObject, dbObject);
await PopulateVizFields(putObject);
return putObject;
}
@@ -277,6 +280,15 @@ namespace Sockeye.Biz
vc.Add(await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => x.Name).FirstOrDefaultAsync(), "customer", o.CustomerId);
}
o.CustomerViz = vc.Get("customer", o.CustomerId);
foreach (var item in o.Items)//some subscriptions have a bunch of the same monthly or yearly raven user in them so this will save in that case
{
if (!vc.Has("productname", item.ProductId))
{
vc.Add(await ct.Product.AsNoTracking().Where(x => x.Id == item.ProductId).Select(x => x.Name).FirstOrDefaultAsync(), "productname", item.ProductId);
}
item.ProductViz = vc.Get("productname", item.ProductId);
}
}
////////////////////////////////////////////////////////////////////////////////////////////////