using System.Collections.Generic; using Microsoft.AspNetCore.Mvc; using SimApi.Communications; using SimApi.Helpers; namespace SimApi.Controllers; public class SimApiCommonController : SimApiBaseController { /// /// 错误回馈页面 /// /// 错误代码 /// [HttpGet("exception/{code:int}")] [ApiExplorerSettings(IgnoreApi = true)] public SimApiBaseResponse ExceptionHandler(int code) { return new SimApiBaseResponse(code); } [HttpPost, HttpGet] public SimApiBaseResponse> Versions() { return new SimApiBaseResponse>() { Data = new Dictionary { { "SimApi", SimApiUtil.SimApiVersion }, { "App", SimApiUtil.AppVersion } } }; } }