using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MadRunFabric.Common;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace PLCAutomationApi.Controllers
{
    [ApiVersion("6.0")]
    [AllowAnonymous]
    [Produces("application/json")]
    [Route("api/Info")]
    public class InfoController : BaseController
    {
        [HttpGet]
        public IEnumerable<string> Get()
        {
            //return new string[] { $"版本信息 {RequestedApiVersion}", "开发团队: Mad Fun Fabric", Request.Headers.ToJson() };
            return new string[] { $"版本信息 {RequestedApiVersion}", "开发团队: Mad Fun Fabric" };
        }

        protected ApiVersion RequestedApiVersion => HttpContext.GetRequestedApiVersion();
    }
}