重构代码:api/New请求地址物理文件更改到api目录下

This commit is contained in:
Argo-MacBookPro 2018-08-26 15:44:19 +08:00
parent f1c0fdcf8d
commit 0fc128d3d8
1 changed files with 26 additions and 24 deletions

View File

@ -1,25 +1,27 @@
using Bootstrap.DataAccess; using Bootstrap.DataAccess;
using Bootstrap.Security; using Bootstrap.Security;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Authorization;
using System.Linq; using Microsoft.AspNetCore.Mvc;
using System.Linq;
namespace Bootstrap.Admin.Controllers
{ namespace Bootstrap.Admin.Controllers
/// <summary> {
/// /// <summary>
/// </summary> ///
[Route("api/[controller]")] /// </summary>
public class NewController : Controller [Route("api/[controller]")]
{ public class NewController : Controller
/// <summary> {
/// /// <summary>
/// </summary> ///
/// <param name="value"></param> /// </summary>
/// <returns></returns> /// <param name="value"></param>
[HttpGet] /// <returns></returns>
public bool Get(string userName) [HttpGet]
{ [AllowAnonymous]
return BootstrapUser.RetrieveUserByUserName(userName) == null && !UserHelper.RetrieveNewUsers().Any(u => u.UserName == userName); public bool Get(string userName)
} {
} return BootstrapUser.RetrieveUserByUserName(userName) == null && !UserHelper.RetrieveNewUsers().Any(u => u.UserName == userName);
}
}
} }