using Bootstrap.DataAccess; using Bootstrap.Security; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System.Linq; namespace Bootstrap.Admin.Controllers.Api { [AllowAnonymous] [Route("api/[controller]")] public class RegisterController : Controller { /// /// 登录页面注册新用户remote validate调用 /// /// /// [HttpGet] public bool Get(string userName) { return BootstrapUser.RetrieveUserByUserName(userName) == null && !UserHelper.RetrieveNewUsers().Any(u => u.UserName == userName); } } }