Fix alive, migrate write, add online matching stub, start rank

This commit is contained in:
asesidaa
2023-02-14 02:47:08 +08:00
parent 5c85e83c3e
commit 02a241567c
17 changed files with 341 additions and 139 deletions
@@ -0,0 +1,34 @@
using Domain.Enums;
using Microsoft.AspNetCore.Mvc;
using Throw;
namespace MainServer.Controllers.Game;
[ApiController]
[Route("ranking")]
public class RankingController : BaseController<RankingController>
{
[HttpGet("ranking.php")]
public async Task<ActionResult<string>> Ranking([FromQuery(Name = "cmd_type")] int rankType)
{
var type = (RankingCommandType)rankType;
type.Throw().IfOutOfRange();
switch (type)
{
case RankingCommandType.GlobalRank:
break;
case RankingCommandType.PlayNumRank:
break;
case RankingCommandType.EventRank:
break;
case RankingCommandType.MonthlyRank:
break;
case RankingCommandType.ShopRank:
break;
default:
throw new ArgumentOutOfRangeException(nameof(type), type, "Should not happen!");
}
return "";
}
}