mirror of
https://gitlab.com/buildfeed/BuildFeed.git
synced 2024-03-22 21:10:34 +08:00
Bugfix for the API update
This commit is contained in:
parent
676eb3d7f9
commit
68c7b3c659
|
@ -170,14 +170,17 @@ await _buildCollection
|
|||
[DataObjectMethod(DataObjectMethodType.Insert, false)]
|
||||
public async Task InsertAll(IEnumerable<BuildModel> items)
|
||||
{
|
||||
List<BuildModel> generatedItems = new List<BuildModel>();
|
||||
foreach (BuildModel item in items)
|
||||
{
|
||||
item.Id = Guid.NewGuid();
|
||||
item.LabUrl = item.GenerateLabUrl();
|
||||
|
||||
generatedItems.Add(item);
|
||||
}
|
||||
|
||||
await _buildCollection
|
||||
.InsertManyAsync(items);
|
||||
.InsertManyAsync(generatedItems);
|
||||
}
|
||||
|
||||
[DataObjectMethod(DataObjectMethodType.Update, true)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user