using GxPress.Common.Tools;
using GxPress.Result.About;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace GxPress.Api.AppControllers
{
///
/// app
///
[Route("api/app/about")]
[ApiController]
[Authorize]
public class AboutController : ControllerBase
{
///
/// 关于 对付对付
///
///
[HttpGet("info")]
public AboutResult About()
{
var addressUrlDownload = ConfigHelper.GetValue("ServiceAddress:AddressUrlDownload");
var aboutResult = new AboutResult
{
AboutUrl = StringUtils.AddDomain("/static/aboutus.html"),
DownloadUrl = StringUtils.AddDomain($"{addressUrlDownload}/d")
};
return aboutResult;
}
[HttpGet("register")]
[AllowAnonymous]
public bool IsRegister()
{
var isRegisterValue = ConfigHelper.GetValue("ServiceAddress:IsRegister");
if (bool.TryParse(isRegisterValue, out bool isRegister))
return isRegister;
return false;
}
}
}