Commit 64f2c417 authored by Marcel Nellesen's avatar Marcel Nellesen
Browse files

Merge branch 'Sprint/2020-10' into 'master'

Sprint/2020-10

See merge request coscine/api/project!93
parents 0c1c70ab 8cef53c7
......@@ -110,11 +110,12 @@ namespace Coscine.Api.Project.Tests
StartDate = DateTime.Now,
EndDate = DateTime.Now.AddYears(1),
Keywords = "Test1;Test2",
GrantId = "testid",
PrincipleInvestigators = "TestInvestigator",
VisibilityId = Visibility.Id
VisibilityId = Visibility.Id,
Slug = Guid.NewGuid().ToString()
};
projectModel.Insert(project);
......@@ -149,7 +150,8 @@ namespace Coscine.Api.Project.Tests
GrantId = "testid",
PrincipleInvestigators = "TestInvestigator",
VisibilityId = Visibility.Id
VisibilityId = Visibility.Id,
Slug = Guid.NewGuid().ToString()
};
projectModel.Insert(project2);
Projects.Add(projectModel.GetById(project2.Id));
......
......@@ -56,17 +56,17 @@
<Reference Include="Consul, Version=0.7.2.6, Culture=neutral, PublicKeyToken=20a6ad9a81df1d95, processorArchitecture=MSIL">
<HintPath>..\packages\Consul.0.7.2.6\lib\net45\Consul.dll</HintPath>
</Reference>
<Reference Include="Coscine.Action, Version=1.12.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\Coscine.Action.1.12.0\lib\net461\Coscine.Action.dll</HintPath>
<Reference Include="Coscine.Action, Version=1.13.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\Coscine.Action.1.13.0\lib\net461\Coscine.Action.dll</HintPath>
</Reference>
<Reference Include="Coscine.ApiCommons, Version=1.7.2.0, Culture=neutral, PublicKeyToken=af4c1345df96546b, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.ApiCommons.1.7.2\lib\net461\Coscine.ApiCommons.dll</HintPath>
<Reference Include="Coscine.ApiCommons, Version=1.8.0.0, Culture=neutral, PublicKeyToken=af4c1345df96546b, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.ApiCommons.1.8.0\lib\net461\Coscine.ApiCommons.dll</HintPath>
</Reference>
<Reference Include="Coscine.Configuration, Version=1.5.0.0, Culture=neutral, PublicKeyToken=ce3d7a32d7dc1e5a, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Configuration.1.5.0\lib\net461\Coscine.Configuration.dll</HintPath>
</Reference>
<Reference Include="Coscine.Database, Version=1.19.0.0, Culture=neutral, PublicKeyToken=767d77427707b70a, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Database.1.19.0\lib\net461\Coscine.Database.dll</HintPath>
<Reference Include="Coscine.Database, Version=1.21.0.0, Culture=neutral, PublicKeyToken=767d77427707b70a, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Database.1.21.0\lib\net461\Coscine.Database.dll</HintPath>
</Reference>
<Reference Include="Coscine.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=e1ed402bc3f6525e, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Logging.1.2.0\lib\net461\Coscine.Logging.dll</HintPath>
......
......@@ -115,7 +115,7 @@ namespace Coscine.Api.Project.Tests
ProjectObject newProjectObject = new ProjectObject(Guid.NewGuid(), "NewProject", "NewDisplayName", DateTime.Now, DateTime.Now.AddYears(1), "test2;test3", "abc", "investigator", "grandId",
new List<DisciplineObject>() { new DisciplineObject(Discipline.Id, Discipline.Url, Discipline.DisplayNameDe, Discipline.DisplayNameEn) },
new List<OrganizationObject>() { new OrganizationObject(Organization, Organization) },
new VisibilityObject(Visibility.Id, Visibility.DisplayName));
new VisibilityObject(Visibility.Id, Visibility.DisplayName), Guid.NewGuid().ToString());
var stream = ObjectFactory<ProjectObject>.SerializeToStream(newProjectObject);
......@@ -150,7 +150,7 @@ namespace Coscine.Api.Project.Tests
ProjectObject newProjectObject = new ProjectObject(Guid.NewGuid(), "NewProject", "NewDisplayName", DateTime.Now, DateTime.Now.AddYears(1), "test2;test3", "abc", "investigator", "grandId",
new List<DisciplineObject>() { new DisciplineObject(Discipline.Id, Discipline.Url, Discipline.DisplayNameDe, Discipline.DisplayNameEn) },
new List<OrganizationObject>() { new OrganizationObject(Organization, Organization) },
new VisibilityObject(Visibility.Id, Visibility.DisplayName));
new VisibilityObject(Visibility.Id, Visibility.DisplayName), Guid.NewGuid().ToString());
var stream = ObjectFactory<ProjectObject>.SerializeToStream(newProjectObject);
......@@ -188,7 +188,7 @@ namespace Coscine.Api.Project.Tests
ProjectObject newProjectObject = new ProjectObject(Guid.NewGuid(), "NewProject", "NewDisplayName", DateTime.Now, DateTime.Now.AddYears(1), "test2;test3", "abc", "investigator", "grandId",
new List<DisciplineObject>() { new DisciplineObject(Discipline.Id, Discipline.Url, Discipline.DisplayNameDe, Discipline.DisplayNameEn) },
new List<OrganizationObject>() { new OrganizationObject(Organization, Organization) },
new VisibilityObject(Visibility.Id, Visibility.DisplayName));
new VisibilityObject(Visibility.Id, Visibility.DisplayName), Guid.NewGuid().ToString());
var stream = ObjectFactory<ProjectObject>.SerializeToStream(newProjectObject);
......@@ -203,7 +203,7 @@ namespace Coscine.Api.Project.Tests
newProjectObject = new ProjectObject(Guid.NewGuid(), "NewProject", "NewDisplayName", DateTime.Now, DateTime.Now.AddYears(1), "test2;test3", "abc", "investigator", "grandId",
new List<DisciplineObject>() { new DisciplineObject(Discipline.Id, Discipline.Url, Discipline.DisplayNameDe, Discipline.DisplayNameEn) },
new List<OrganizationObject>() { new OrganizationObject(Organization, Organization) },
new VisibilityObject(Visibility.Id, Visibility.DisplayName),
new VisibilityObject(Visibility.Id, Visibility.DisplayName), Guid.NewGuid().ToString(),
createdProjectObject.Id);
stream = ObjectFactory<ProjectObject>.SerializeToStream(newProjectObject);
......@@ -235,7 +235,7 @@ namespace Coscine.Api.Project.Tests
ProjectObject newProjectObject = new ProjectObject(Guid.NewGuid(), "NewProject", "NewDisplayName", DateTime.Now, DateTime.Now.AddYears(1), "test2;test3", "abc", "investigator", "grandId",
new List<DisciplineObject>() { new DisciplineObject(Discipline.Id, Discipline.Url, Discipline.DisplayNameDe, Discipline.DisplayNameEn) },
new List<OrganizationObject>() { new OrganizationObject(Organization, Organization) },
new VisibilityObject(Visibility.Id, Visibility.DisplayName));
new VisibilityObject(Visibility.Id, Visibility.DisplayName), Guid.NewGuid().ToString());
var stream = ObjectFactory<ProjectObject>.SerializeToStream(newProjectObject);
FakeControllerContext(Users[0], stream);
......@@ -247,7 +247,7 @@ namespace Coscine.Api.Project.Tests
ProjectObject newSubProjectObject = new ProjectObject(Guid.NewGuid(), "NewSubProject", "NewDisplayNameSub", DateTime.Now, DateTime.Now.AddYears(1), "test2;test3", "abc", "investigator", "grandId",
new List<DisciplineObject>() { new DisciplineObject(Discipline.Id, Discipline.Url, Discipline.DisplayNameDe, Discipline.DisplayNameEn) },
new List<OrganizationObject>() { new OrganizationObject(Organization, Organization) },
new VisibilityObject(Visibility.Id, Visibility.DisplayName),
new VisibilityObject(Visibility.Id, Visibility.DisplayName), Guid.NewGuid().ToString(),
createdProjectObject.Id);
var subStream = ObjectFactory<ProjectObject>.SerializeToStream(newSubProjectObject);
......
......@@ -88,7 +88,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Coscine.Database" publicKeyToken="767d77427707b70a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.19.0.0" newVersion="1.19.0.0" />
<bindingRedirect oldVersion="0.0.0.0-1.21.0.0" newVersion="1.21.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
......
......@@ -4,10 +4,10 @@
<package id="AutoMapper.Extensions.Microsoft.DependencyInjection" version="6.0.0" targetFramework="net472" />
<package id="Castle.Core" version="4.4.0" targetFramework="net472" />
<package id="Consul" version="0.7.2.6" targetFramework="net472" />
<package id="Coscine.Action" version="1.12.0" targetFramework="net472" />
<package id="Coscine.ApiCommons" version="1.7.2" targetFramework="net472" />
<package id="Coscine.Action" version="1.13.0" targetFramework="net472" />
<package id="Coscine.ApiCommons" version="1.8.0" targetFramework="net472" />
<package id="Coscine.Configuration" version="1.5.0" targetFramework="net472" />
<package id="Coscine.Database" version="1.19.0" targetFramework="net472" />
<package id="Coscine.Database" version="1.21.0" targetFramework="net472" />
<package id="Coscine.Logging" version="1.2.0" targetFramework="net472" />
<package id="Coscine.ProxyApi" version="1.2.1" targetFramework="net472" />
<package id="EntityFramework" version="6.2.0" targetFramework="net472" />
......
......@@ -91,7 +91,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Coscine.Database" publicKeyToken="767d77427707b70a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.19.0.0" newVersion="1.19.0.0" />
<bindingRedirect oldVersion="0.0.0.0-1.21.0.0" newVersion="1.21.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
......
......@@ -15,6 +15,7 @@ using Microsoft.Extensions.Logging;
using Newtonsoft.Json.Linq;
using Coscine.Database.DataModel;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace Coscine.Api.Project.Controllers
{
......
......@@ -171,7 +171,7 @@ namespace Coscine.Api.Project.Controllers
jd.DisplayNameDe.Contains(searchQuery) ||
jd.DisplayNameEn.Contains(searchQuery))
select new { p.Id, p.DisplayName }).OrderBy(element => element.DisplayName).Distinct();
select new { p.Id, p.DisplayName, p.Slug }).OrderBy(element => element.DisplayName).Distinct();
return JToken.Parse(JsonConvert.SerializeObject(results));
});
}
......@@ -215,7 +215,7 @@ namespace Coscine.Api.Project.Controllers
jd.DisplayNameDe.Contains(searchQuery) ||
jd.DisplayNameEn.Contains(searchQuery))
select new { r.Id, r.DisplayName, jpr.ProjectId }).OrderBy(element => element.DisplayName).Distinct();
select new { r.Id, r.DisplayName, jpr.ProjectId, jp.Slug }).OrderBy(element => element.DisplayName).Distinct();
return JToken.Parse(JsonConvert.SerializeObject(results));
......
......@@ -49,17 +49,17 @@
<Reference Include="Consul, Version=0.7.2.6, Culture=neutral, PublicKeyToken=20a6ad9a81df1d95, processorArchitecture=MSIL">
<HintPath>..\packages\Consul.0.7.2.6\lib\net45\Consul.dll</HintPath>
</Reference>
<Reference Include="Coscine.Action, Version=1.12.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\Coscine.Action.1.12.0\lib\net461\Coscine.Action.dll</HintPath>
<Reference Include="Coscine.Action, Version=1.13.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\Coscine.Action.1.13.0\lib\net461\Coscine.Action.dll</HintPath>
</Reference>
<Reference Include="Coscine.ApiCommons, Version=1.7.2.0, Culture=neutral, PublicKeyToken=af4c1345df96546b, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.ApiCommons.1.7.2\lib\net461\Coscine.ApiCommons.dll</HintPath>
<Reference Include="Coscine.ApiCommons, Version=1.8.0.0, Culture=neutral, PublicKeyToken=af4c1345df96546b, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.ApiCommons.1.8.0\lib\net461\Coscine.ApiCommons.dll</HintPath>
</Reference>
<Reference Include="Coscine.Configuration, Version=1.5.0.0, Culture=neutral, PublicKeyToken=ce3d7a32d7dc1e5a, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Configuration.1.5.0\lib\net461\Coscine.Configuration.dll</HintPath>
</Reference>
<Reference Include="Coscine.Database, Version=1.19.0.0, Culture=neutral, PublicKeyToken=767d77427707b70a, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Database.1.19.0\lib\net461\Coscine.Database.dll</HintPath>
<Reference Include="Coscine.Database, Version=1.21.0.0, Culture=neutral, PublicKeyToken=767d77427707b70a, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Database.1.21.0\lib\net461\Coscine.Database.dll</HintPath>
</Reference>
<Reference Include="Coscine.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=e1ed402bc3f6525e, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Logging.1.2.0\lib\net461\Coscine.Logging.dll</HintPath>
......
......@@ -4,10 +4,10 @@
<package id="AutoMapper.Extensions.Microsoft.DependencyInjection" version="6.0.0" targetFramework="net472" />
<package id="Castle.Core" version="4.4.0" targetFramework="net472" />
<package id="Consul" version="0.7.2.6" targetFramework="net472" />
<package id="Coscine.Action" version="1.12.0" targetFramework="net472" />
<package id="Coscine.ApiCommons" version="1.7.2" targetFramework="net472" />
<package id="Coscine.Action" version="1.13.0" targetFramework="net472" />
<package id="Coscine.ApiCommons" version="1.8.0" targetFramework="net472" />
<package id="Coscine.Configuration" version="1.5.0" targetFramework="net472" />
<package id="Coscine.Database" version="1.19.0" targetFramework="net472" />
<package id="Coscine.Database" version="1.21.0" targetFramework="net472" />
<package id="Coscine.Logging" version="1.2.0" targetFramework="net472" />
<package id="Coscine.ProxyApi" version="1.2.1" targetFramework="net472" />
<package id="EntityFramework" version="6.2.0" targetFramework="net472" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment