Removed temporary test code and fixed dependency.

pull/129/head
Halil İbrahim Kalkan 7 years ago
parent ee50a84f57
commit a028bfcc4b

@ -21,8 +21,8 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" /> <ProjectReference Include="..\..\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" />
<ProjectReference Include="..\..\Volo.Abp.Identity.EntityFrameworkCore\Volo.Abp.Identity.EntityFrameworkCore.csproj" /> <ProjectReference Include="..\..\Volo.Abp.Identity.EntityFrameworkCore\Volo.Abp.Identity.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\Volo.Abp.Identity.HttpApi\Volo.Abp.Identity.HttpApi.csproj" />
<ProjectReference Include="..\AbpDesk.Application.Contracts\AbpDesk.Application.Contracts.csproj" /> <ProjectReference Include="..\AbpDesk.Application.Contracts\AbpDesk.Application.Contracts.csproj" />
<ProjectReference Include="..\..\Volo.Abp.AspNetCore.Mvc\Volo.Abp.AspNetCore.Mvc.csproj" /> <ProjectReference Include="..\..\Volo.Abp.AspNetCore.Mvc\Volo.Abp.AspNetCore.Mvc.csproj" />
<ProjectReference Include="..\AbpDesk.EntityFrameworkCore\AbpDesk.EntityFrameworkCore.csproj" /> <ProjectReference Include="..\AbpDesk.EntityFrameworkCore\AbpDesk.EntityFrameworkCore.csproj" />

@ -27,7 +27,7 @@ namespace AbpDesk.Web.Mvc
typeof(AbpAspNetCoreMvcUiBootstrapModule), typeof(AbpAspNetCoreMvcUiBootstrapModule),
typeof(AbpDeskApplicationModule), typeof(AbpDeskApplicationModule),
typeof(AbpDeskEntityFrameworkCoreModule), typeof(AbpDeskEntityFrameworkCoreModule),
typeof(AbpIdentityApplicationModule), typeof(AbpIdentityHttpApiModule),
typeof(AbpIdentityEntityFrameworkCoreModule), typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpIdentityWebModule), typeof(AbpIdentityWebModule),
typeof(AbpAutofacModule) typeof(AbpAutofacModule)

@ -1,5 +1,4 @@
using System; using System;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
@ -19,10 +18,7 @@ namespace Volo.Abp.Identity
{ {
opts.RootPath = "identity"; opts.RootPath = "identity";
opts.UrlControllerNameNormalizer = context => context.ControllerName.RemovePreFix("Identity"); opts.UrlControllerNameNormalizer = context => context.ControllerName.RemovePreFix("Identity");
opts.ApiVersions.Add(new ApiVersion(2, 0));
}); });
options.ConventionalControllers.Create(typeof(AbpIdentityHttpApiModule).Assembly);
}); });
} }
} }

@ -1,46 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.ApiVersioning;
using Volo.Abp.Application.Services;
using Volo.Abp.AspNetCore.Mvc;
namespace Volo.Abp.Identity
{
//TODO: This is just a test controller and will be removed later
[ApiVersion("3.0")]
[ApiVersion("2.0", Deprecated = true)]
[Route("api/v{apiVersion:apiVersion}/identity/fixture")]
public class FixtureController : AbpController, IRemoteService
{
private readonly IRequestedApiVersion _requestedApiVersion;
public FixtureController(IRequestedApiVersion requestedApiVersion)
{
_requestedApiVersion = requestedApiVersion;
}
[HttpGet, MapToApiVersion("2.0")]
public string Get()
{
return 41 + " - " + _requestedApiVersion.Current;
}
[HttpGet, MapToApiVersion("3.0")]
public string Get3()
{
return 42 + " - " + _requestedApiVersion.Current;
}
[HttpPost]
public int Post()
{
return 43;
}
[HttpPost]
[Route("{id}")]
public int Post(int id)
{
return id;
}
}
}

@ -1,26 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.ApiVersioning;
using Volo.Abp.Application.Services;
using Volo.Abp.AspNetCore.Mvc;
namespace Volo.Abp.Identity.V4
{
//TODO: This is just a test controller and will be removed later
[ApiVersion("4.0")]
[Route("api/v{apiVersion:apiVersion}/identity/fixture")]
public class FixtureController : AbpController, IRemoteService
{
private readonly IRequestedApiVersion _requestedApiVersion;
public FixtureController(IRequestedApiVersion requestedApiVersion)
{
_requestedApiVersion = requestedApiVersion;
}
[HttpGet]
public string Get()
{
return 41 + " - " + _requestedApiVersion.Current;
}
}
}
Loading…
Cancel
Save