csharp-sdk-upm/Engine/Internal/Controllers/LCPingController.cs

23 lines
610 B
C#
Raw Normal View History

2021-03-19 14:45:29 +08:00
using System;
using System.Collections.Generic;
2021-03-19 17:02:57 +08:00
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Cors;
2021-04-09 14:24:04 +08:00
using LeanCloud.Common;
2021-03-18 13:52:23 +08:00
namespace LeanCloud.Engine {
2021-03-19 17:02:57 +08:00
[ApiController]
[Route("__engine/{1,1.1}")]
[EnableCors(LCEngine.LCEngineCORS)]
public class LCPingController : ControllerBase {
[HttpGet("ping")]
public object Get() {
2021-03-18 13:52:23 +08:00
LCLogger.Debug("Ping ~~~");
2021-03-19 17:02:57 +08:00
2021-03-18 13:52:23 +08:00
return new Dictionary<string, string> {
2021-03-19 14:45:29 +08:00
{ "runtime", $"dotnet-{Environment.Version}" },
2021-04-09 14:24:04 +08:00
{ "version", LCCore.SDKVersion }
2021-03-18 13:52:23 +08:00
};
}
}
}