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

22 lines
593 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-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-03-18 13:52:23 +08:00
{ "version", LCApplication.SDKVersion }
};
}
}
}