Skip to content
Snippets Groups Projects
Commit d7166691 authored by Sirieam Marie Hunke's avatar Sirieam Marie Hunke
Browse files

Changed to type long

parent 3328e1e1
No related branches found
No related tags found
1 merge request!43Fix: NaN Quota in Admin
......@@ -198,7 +198,7 @@ namespace Coscine.Api.Admin.Controllers
/// <param name="resourceType">The used resource type.</param>
/// <param name="projectId">The used project.</param>
/// <returns>Allocated quota of the given resource type in the project.</returns>
private int CalculateAllocatedForAll(ResourceType resourceType, Guid projectId)
private long CalculateAllocatedForAll(ResourceType resourceType, Guid projectId)
{
var resources = _resourceModel.GetAllWhere((resource) =>
(from projectResource in resource.ProjectResources
......@@ -220,7 +220,7 @@ namespace Coscine.Api.Admin.Controllers
}
});
return (int)allocated;
return allocated;
}
/// <summary>
......@@ -229,7 +229,7 @@ namespace Coscine.Api.Admin.Controllers
/// <param name="resourceType">The used resource type.</param>
/// <param name="projectId">The used project.</param>
/// <returns>Used quota of the given resource type in the project.</returns>
private int CalculateUsedForAll(ResourceType resourceType, Guid projectId)
private long CalculateUsedForAll(ResourceType resourceType, Guid projectId)
{
var resources = _resourceModel.GetAllWhere((resource) =>
(from projectResource in resource.ProjectResources
......@@ -252,7 +252,7 @@ namespace Coscine.Api.Admin.Controllers
}
);
return (int)used;
return used;
}
private AdminQuotaReturnObject CreateAdminQuotaReturnObject(ProjectQuota projectQuota, Guid projectId)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment