Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • coscine/backend/apis/pid
1 result
Select Git revision
Show changes
Commits on Source (3)
using Coscine.Action;
using Coscine.Action;
using Coscine.Action.EventArgs;
using Coscine.Api.Pid.Models;
using Coscine.Configuration;
......@@ -92,10 +92,11 @@ namespace Coscine.Api.Pid.Controllers
if (projectId.HasValue)
{
projectObject = _projectModel.CreateReturnObjectFromDatabaseObject(_projectModel.GetById(projectId.Value));
project = _projectModel.GetById(projectId.Value);
projectObject = _projectModel.CreateReturnObjectFromDatabaseObject(project);
var ownerId = _roleModel.GetAllWhere((x) => (x.DisplayName == "owner")).First().Id;
projectOwners = _projectRoleModel.GetAllWhere((x) => x.RoleId == ownerId && x.ProjectId == project.Id);
projectOwners = _projectRoleModel.GetAllWhere((x) => x.RoleId == ownerId && x.ProjectId == projectId.Value);
}
}
else if (project != null)
......@@ -127,6 +128,11 @@ namespace Coscine.Api.Pid.Controllers
private void LogAnalyticsPidEnquiry(Project project, Resource resource, string applicationsProfile, string license,
IEnumerable<DisciplineObject> disciplines, IEnumerable<OrganizationObject> organizations, IEnumerable<ProjectRole> owners, string email)
{
string visibility = null;
if (project != null && project.VisibilityId.HasValue)
{
visibility = _visibilityModel.GetById(project.VisibilityId.Value)?.DisplayName;
}
_coscineLogger.AnalyticsLog(
new AnalyticsLogObject
{
......@@ -138,7 +144,7 @@ namespace Coscine.Api.Pid.Controllers
License = license,
Disciplines = disciplines?.Select(x => x.DisplayNameEn).ToList(),
Organizations = organizations?.Select(x => x.DisplayName).ToList(),
Visibility = project.VisibilityId.HasValue ? _visibilityModel.GetById(project.VisibilityId.Value)?.DisplayName : null,
Visibility = visibility,
UserList = owners?.Select(x => x.UserId.ToString()).ToList(),
ExternalInfo = email == null ? null : HashMail(email),
});
......
......@@ -5,7 +5,7 @@
<AssemblyName>Coscine.Api.Pid</AssemblyName>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetFramework>net5.0</TargetFramework>
<Version>2.2.1</Version>
<Version>2.2.2</Version>
</PropertyGroup>
<PropertyGroup>
<Authors>RWTH Aachen University</Authors>
......